提交 a87f7d3d 编写于 作者: Y yeliang2258

fix neg

上级 47de9f50
...@@ -1995,20 +1995,8 @@ class OpSet9(): ...@@ -1995,20 +1995,8 @@ class OpSet9():
@print_mapping_info @print_mapping_info
def Neg(self, node): def Neg(self, node):
val_x = self.graph.get_input_node(node, idx=0, copy=True) val_x = self.graph.get_input_node(node, idx=0, copy=True)
val_y = node.name + "_y"
dtype = np.dtype(val_x.dtype)
self.paddle_graph.add_layer( self.paddle_graph.add_layer(
"paddle.full", "paddle.neg", inputs={'x': val_x.name}, outputs=[node.name])
inputs={},
outputs=[val_y],
dtype=string(dtype),
shape=[1],
fill_value=-1)
self.paddle_graph.add_layer(
"paddle.multiply",
inputs={'x': val_x.name,
'y': val_y},
outputs=[node.name])
@print_mapping_info @print_mapping_info
def SpaceToDepth(self, node): def SpaceToDepth(self, node):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册