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

26 lines
763 B
Python

# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from extensions.ops.proposal import ProposalOp
from mo.front.caffe.extractor import register_caffe_python_extractor
from mo.graph.graph import Graph
from mo.ops.op import Op
class ProposalPythonExampleOp(Op):
op = 'Proposal'
def __init__(self, graph: Graph, attrs: dict):
mandatory_props = {
'type': __class__.op,
'op': __class__.op,
'post_nms_topn': 300,
'infer': ProposalOp.proposal_infer
}
super().__init__(graph, mandatory_props, attrs)
register_caffe_python_extractor(ProposalPythonExampleOp, 'rpn.proposal_layer.ProposalLayer.example')
Op.excluded_classes.append(ProposalPythonExampleOp)