Skip to content

Commit

Permalink
Add mish op to python api
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jul 27, 2020
1 parent 246451e commit 70c02bb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions ngraph/python/src/ngraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
from ngraph.opset4 import max_pool
from ngraph.opset4 import maximum
from ngraph.opset4 import minimum
from ngraph.opset4 import mish
from ngraph.opset4 import mod
from ngraph.opset4 import multiply
from ngraph.opset4 import mvn
Expand Down
1 change: 1 addition & 0 deletions ngraph/python/src/ngraph/opset4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
from ngraph.opset1.ops import max_pool
from ngraph.opset1.ops import maximum
from ngraph.opset1.ops import minimum
from ngraph.opset4.ops import mish
from ngraph.opset1.ops import mod
from ngraph.opset1.ops import multiply
from ngraph.opset2.ops import mvn
Expand Down
10 changes: 10 additions & 0 deletions ngraph/python/src/ngraph/opset4/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,13 @@ def non_max_suppression(
}

return _get_node_factory_opset4().create("NonMaxSuppression", inputs, attributes)


@nameable_op
def mish(data: NodeInput, name: Optional[str] = None,) -> Node:
"""Return a node which performs Mish.
:param data: Tensor with input data floating point type.
:return: The new node which performs Mish
"""
return _get_node_factory_opset4().create("Mish", as_nodes(data), {})

0 comments on commit 70c02bb

Please sign in to comment.