Skip to content

Commit

Permalink
Add support for Sigmoid and Mul ops in PytorchParser (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
slomrafgrav authored and kitstar committed Dec 6, 2018
1 parent eda67ef commit 72529a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mmdnn/conversion/pytorch/pytorch_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class PytorchParser(Parser):
'onnx::Concat': 'Concat',
'onnx::Relu': 'Relu',
'onnx::Tanh': 'Tanh',
'onnx::Sigmoid': 'Sigmoid',
'onnx::Mul': 'Mul'


# TODO
Expand Down Expand Up @@ -308,6 +310,12 @@ def rename_Relu(self, source_node):
def rename_Tanh(self, source_node):
IR_node = self._convert_identity_operation(source_node, new_op="Tanh")

def rename_Sigmoid(self, source_node):
IR_node = self._convert_identity_operation(source_node, new_op="Sigmoid")

def rename_Mul(self, source_node):
IR_node = self._convert_identity_operation(source_node, new_op="Mul")

def rename_Maxpool(self, source_node):
attr = source_node.attrs
kwargs = dict()
Expand Down

0 comments on commit 72529a9

Please sign in to comment.