提交 58667218 authored 作者: James Bergstra's avatar James Bergstra

Added infer_shape to alloc

上级 a286bf13
......@@ -1766,6 +1766,9 @@ class Alloc(gof.Op):
out[0] = numpy.zeros(sh, dtype=v.dtype)
out[0][...] = v # broadcast v to fill us up
def infer_shape(self, node, input_shapes):
return [node.inputs[1:]]
def grad(self, inputs, (gout,)):
return [None for i in inputs]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论