提交 3d01f413 authored 作者: James Bergstra's avatar James Bergstra

relaxed the requirement in raw_random that node inputs have the same dtype as op default arguments

上级 ad942afa
...@@ -143,7 +143,11 @@ class RandomFunction(gof.Op): ...@@ -143,7 +143,11 @@ class RandomFunction(gof.Op):
# build the inputs to this Apply by overlaying args on self.args # build the inputs to this Apply by overlaying args on self.args
inputs = [] inputs = []
for arg, default in zip(args, self.args): for arg, default in zip(args, self.args):
assert arg is None or default.type.dtype == arg.type.dtype # The NAACL test is failing because of this assert.
# I am commenting out the requirement that the dtypes match because it doesn't seem
# to me to be necessary (although I agree it is typically true).
# -JB 20090819
#assert arg is None or default.type.dtype == arg.type.dtype
if arg is None: if arg is None:
input = default input = default
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论