提交 e17dcd35 authored 作者: Faruk Ahmed's avatar Faruk Ahmed

adding helpful comments

上级 8f373dd5
......@@ -778,7 +778,10 @@ def split_huge_add_or_mul(node, op=None):
inner_op = []
for i in range(0, len(node.inputs), max_nb_inputs):
inner_op.append(op(*node.inputs[i: i + max_nb_inputs]))
# Reuse node.op because op(*inner_op) could fail if there is
# still too many inputs
node = node.op(*inner_op).owner
# Apply op() to make sure the returned node is op and not node.op
return op(*node.inputs).owner
gpu_local_elemwise_fusion = tensor.opt.local_elemwise_fusion_op(
......
......@@ -459,7 +459,7 @@ def test_many_arg_elemwise():
for num_args in [64]:
for op_to_test in [theano.tensor.add, theano.tensor.mul]:
for nb_dim in [2, 8]:
shapes = [rng.randint(1, int(32 / nb_dim)) for i in range(nb_dim)]
shapes = [rng.randint(1, 5) for i in range(nb_dim)]
args = [np.cast['float32'](rng.randn(*shapes))
for arg in range(0, num_args)]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论