提交 e95a1f9d 编写于 作者: C Channingss

support abs,instance_norm

上级 965aa978
...@@ -141,6 +141,11 @@ class OpSet9(object): ...@@ -141,6 +141,11 @@ class OpSet9(object):
'Exp', inputs=op.input('X'), outputs=op.output('Out')) 'Exp', inputs=op.input('X'), outputs=op.output('Out'))
return node return node
def abs(self, op, block):
node = helper.make_node(
'Abs', inputs=op.input('X'), outputs=op.output('Out'))
return node
def leaky_relu(self, op, block): def leaky_relu(self, op, block):
node = helper.make_node( node = helper.make_node(
'LeakyRelu', 'LeakyRelu',
...@@ -375,6 +380,16 @@ class OpSet9(object): ...@@ -375,6 +380,16 @@ class OpSet9(object):
**kwargs) **kwargs)
return node return node
def instance_norm(self, op, block):
kwargs = {'epsilon': op.attr('epsilon'), }
inputs = op.input('X') + op.input('Scale') + op.input('Bias')
node = helper.make_node(
'InstanceNormalization',
inputs=inputs,
outputs=op.output('Y'),
**kwargs)
return node
def concat(self, op, block): def concat(self, op, block):
node = helper.make_node( node = helper.make_node(
'Concat', 'Concat',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册