提交 98bc995b authored 作者: Olivier Breuleux's avatar Olivier Breuleux

adjusted RandomFunction so it converts to the right dtype

上级 690b487a
...@@ -56,7 +56,7 @@ class RandomFunction(gof.Op): ...@@ -56,7 +56,7 @@ class RandomFunction(gof.Op):
rout[0] = r rout[0] = r
rval = self.fn(r, *(args + [shape])) rval = self.fn(r, *(args + [shape]))
if not isinstance(rval, numpy.ndarray): if not isinstance(rval, numpy.ndarray):
out[0] = numpy.asarray(rval) out[0] = numpy.asarray(rval, dtype = node.outputs[0].type.dtype)
else: else:
out[0] = rval out[0] = rval
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论