Files
openvino/model-optimizer/extensions/front/tf/pad_ext.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

36 lines
801 B
Python

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from mo.front.extractor import FrontExtractorOp
from mo.ops.pad import TFPad
class PadFrontExtractor(FrontExtractorOp):
op = 'Pad'
enabled = True
@classmethod
def extract(cls, node):
TFPad.update_node_stat(node)
return cls.enabled
class PadV2FrontExtractor(FrontExtractorOp):
op = 'PadV2'
enabled = True
@classmethod
def extract(cls, node):
TFPad.update_node_stat(node)
return cls.enabled
class MirrorPadFrontExtractor(FrontExtractorOp):
op = 'MirrorPad'
enabled = True
@classmethod
def extract(cls, node):
TFPad.update_node_stat(node, {'mode': node.pb.attr['mode'].s.decode('utf-8').lower()})
return cls.enabled