[ MO ONNX ] Resize-11 clear error message (#620)

* Small refactoring of extractors

* [ MO ] Throwing an exception while extracting Resize-11 which is not supported
This commit is contained in:
Evgenya Stepyreva
2020-05-27 08:09:15 +03:00
committed by GitHub
parent d3ea03bbfc
commit 5c2eb05990
5 changed files with 20 additions and 18 deletions

View File

@@ -25,8 +25,8 @@ class LinearComponentFrontExtractor(FrontExtractorOp):
op = 'linearcomponent'
enabled = True
@staticmethod
def extract(node):
@classmethod
def extract(cls, node):
pb = node.parameters
collect_until_token(pb, b'<Params>')
weights, weights_shape = read_binary_matrix(pb)
@@ -39,4 +39,4 @@ class LinearComponentFrontExtractor(FrontExtractorOp):
embed_input(mapping_rule, 1, 'weights', weights)
FullyConnected.update_node_stat(node, mapping_rule)
return __class__.enabled
return cls.enabled