提交 ef73f0fc authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Added infer_shape and grad method to the View Op (probably they'll never

gonna get used but why not)
上级 aeabc8a9
...@@ -210,6 +210,11 @@ class ViewOp(theano.gof.Op): ...@@ -210,6 +210,11 @@ class ViewOp(theano.gof.Op):
def perform( self, node, args, outs): def perform( self, node, args, outs):
outs[0][0] = args[0] outs[0][0] = args[0]
def infer_shape(self, node, input_shapes):
return input_shapes
def grad(self, args, g_outs):
return g_outs
deep_copy_op = DeepCopyOp() deep_copy_op = DeepCopyOp()
view_op = ViewOp() view_op = ViewOp()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论