Files
openvino/model-optimizer/extensions/ops/BatchNormInference.py
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

27 lines
747 B
Python

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from mo.graph.graph import Graph
from mo.ops.op import Op
class BatchNormInference(Op):
"""
BatchNormInference will be replaced by BNToScaleShift FrontReplacer for Caffe or convert_batch_norm
function for other frameworks
"""
op = 'batchNormInference'
enabled = False
def __init__(self, graph: Graph, attrs: dict):
super().__init__(graph, {
'type': None,
'op': self.op,
'in_ports_count': 5,
'out_ports_count': 1,
'infer': self.infer
}, attrs)
@staticmethod
def infer(node):
node.out_port(0).data.set_shape(node.in_port(0).data.get_shape())