Files
openvino/model-optimizer/extensions/ops/argmin.py
Yegor Kruglov abb1ca657e Implementation of ArgMin ONNX + TF extractors (#5126)
* implement argmin extractors

* reconsidering argmax to topk

* arg ops refactoring

* rename ArgMaxToTopK

* added unittests

* update docs

* move unittest file to new folder

* conversations resolving

* revert changes with argmax.py, move argmin op to a new file

* rename ArgMaxSqueeze

* updated BOM file

* little fix

* code refactoring in ArgMaxOp, updated unittests

Co-authored-by: yegor.kruglov <ykruglov@nnlvdp-mkaglins.inn.intel.com>
2021-05-06 13:41:49 +03:00

31 lines
708 B
Python

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from extensions.ops.argmax import arg_ops_infer
from mo.graph.graph import Graph
from mo.ops.op import Op
class ArgMinOp(Op):
op = 'ArgMin'
enabled = False
def __init__(self, graph: Graph, attrs: dict):
mandatory_props = {
'type': None,
'op': self.op,
'infer': arg_ops_infer,
'output_type': np.int64,
'in_ports_count': 2,
'out_ports_count': 1,
}
super().__init__(graph, mandatory_props, attrs)
def supported_attrs(self):
return [
'top_k',
'axis',
]