Skip to content

Commit

Permalink
[MO] Add extractor for ONNX *OrEqual operations (openvinotoolkit#5932)
Browse files Browse the repository at this point in the history
* Add extractor for ONNX GreaterOrEqual operation

* Add more extractors

* Fix extractor

Co-authored-by: achetver <[email protected]>
  • Loading branch information
2 people authored and yekruglov committed Jun 7, 2021
1 parent 0777f58 commit e73c21e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion model-optimizer/extensions/front/onnx/elementwise_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np

from extensions.ops.elementwise import Add, Sub, Mul, Div, Pow, Less, Equal, Greater, LogicalAnd, LogicalOr, LogicalXor, \
Round
Round, GreaterEqual, LessEqual
from mo.front.extractor import FrontExtractorOp
from mo.front.onnx.extractors.utils import onnx_attr
from mo.graph.graph import Node
Expand Down Expand Up @@ -127,6 +127,7 @@ def extract(cls, node: Node):
EltwiseNMin.update_node_stat(node)
return cls.enabled


class EqualExtractor(FrontExtractorOp):
op = 'Equal'
enabled = True
Expand Down Expand Up @@ -157,6 +158,26 @@ def extract(cls, node):
return cls.enabled


class GreaterOrEqualExtractor(FrontExtractorOp):
op = 'GreaterOrEqual'
enabled = True

@classmethod
def extract(cls, node):
GreaterEqual.update_node_stat(node)
return cls.enabled


class LessOrEqualExtractor(FrontExtractorOp):
op = 'LessOrEqual'
enabled = True

@classmethod
def extract(cls, node):
LessEqual.update_node_stat(node)
return cls.enabled


class AndExtractor(FrontExtractorOp):
op = 'And'
enabled = True
Expand Down

0 comments on commit e73c21e

Please sign in to comment.