提交 d75c6f30 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

More information in error message.

上级 a2bd7dcd
...@@ -3753,7 +3753,7 @@ class Reshape(Op): ...@@ -3753,7 +3753,7 @@ class Reshape(Op):
shp_orig = shp shp_orig = shp
shp = as_tensor_variable(shp, ndim=1) shp = as_tensor_variable(shp, ndim=1)
if not shp.dtype.startswith('int'): if not shp.dtype.startswith('int'):
raise TypeError("Shape must be integers") raise TypeError("Shape must be integers", shp, shp.dtype)
assert shp.ndim == 1 assert shp.ndim == 1
if isinstance(shp, TensorConstant): if isinstance(shp, TensorConstant):
bcast = [s==1 for s in shp.data] bcast = [s==1 for s in shp.data]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论