Files
openvino/model-optimizer/extensions/ops/fake_output.py
T
Alexey Suhov 6478f1742a Align copyright notice in python scripts (CVS-51320) (#4974)
* Align copyright notice in python scripts (CVS-51320)
2021-03-26 17:54:28 +03:00

29 lines
767 B
Python

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from mo.front.common.partial_infer.elemental import copy_shape_infer, copy_value
from mo.graph.graph import Graph
from mo.ops.op import Op
class FakeOutput(Op):
"""
This op is needed only to store the output name, it will be transformed into opset op and is doing nothing
"""
op = 'FakeOutput'
enabled = False
def __init__(self, graph: Graph, attrs: dict):
super().__init__(graph, {
'op': self.op,
'type': None,
'version': None,
'infer': lambda n: copy_shape_infer(n, copy_value),
'type_infer': None,
'in_ports_count': 1,
'out_ports_count': 1,
}, attrs)