提交 d8817656 authored 作者: Frederic's avatar Frederic

Fix assert, broadcastable is always a tuple.

上级 825bf41f
...@@ -3719,7 +3719,7 @@ def local_add_specialize(node): ...@@ -3719,7 +3719,7 @@ def local_add_specialize(node):
ndim = node.outputs[0].type.ndim ndim = node.outputs[0].type.ndim
#Reuse call to constant for cache() #Reuse call to constant for cache()
cst = T.constant(numpy.zeros((1,) * ndim, dtype=dtype)) cst = T.constant(numpy.zeros((1,) * ndim, dtype=dtype))
assert cst.type.broadcastable == [True] * ndim assert cst.type.broadcastable == (True,) * ndim
return fill_chain(cst) return fill_chain(cst)
if len(new_inputs) == 1: if len(new_inputs) == 1:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论