提交 96ea23b6 authored 作者: abergeron's avatar abergeron

Merge pull request #766 from larseeri/shape_raw_random

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