2021-03-26 17:54:28 +03:00
|
|
|
# Copyright (C) 2018-2021 Intel Corporation
|
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2020-08-17 14:38:41 +03:00
|
|
|
|
2020-09-07 10:20:24 +03:00
|
|
|
from mo.front.common.partial_infer.elemental import copy_shape_infer, copy_value
|
2020-08-17 14:38:41 +03:00
|
|
|
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,
|
|
|
|
|
|
2020-09-07 10:20:24 +03:00
|
|
|
'infer': lambda n: copy_shape_infer(n, copy_value),
|
2020-08-17 14:38:41 +03:00
|
|
|
|
|
|
|
|
'type_infer': None,
|
|
|
|
|
|
|
|
|
|
'in_ports_count': 1,
|
|
|
|
|
'out_ports_count': 1,
|
|
|
|
|
}, attrs)
|