提交 d001aa7e authored 作者: Frederic Bastien's avatar Frederic Bastien

fix crash with multinomial infer_shape as it was creating a cycle in the graph.

上级 47de332b
......@@ -184,7 +184,8 @@ class RandomFunction(gof.Op):
else:
# if shape == () then it will depend on args
# if ndim_added != 0 and shape != () then it will depend on args
sample_shp = node.outputs[1].shape
#Use the default infer_shape implementation.
raise tensor.ShapeError()
return [None, [sample_shp[i] for i in xrange(node.outputs[1].ndim)]]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论