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

Better error message.

上级 1c7f6acc
...@@ -1027,8 +1027,8 @@ class ShapeFeature(object): ...@@ -1027,8 +1027,8 @@ class ShapeFeature(object):
# but this works with `local_useless_subtensor`, so for now we # but this works with `local_useless_subtensor`, so for now we
# keep it this way. See #266 for a better long-term fix. # keep it this way. See #266 for a better long-term fix.
if getattr(d, 'dtype', 'int64') != 'int64': if getattr(d, 'dtype', 'int64') != 'int64':
assert d.dtype in theano.tensor.discrete_dtypes, d.dtype assert d.dtype in theano.tensor.discrete_dtypes, (node, d.dtype)
assert str(d.dtype) != 'uint64' assert str(d.dtype) != 'uint64', node
new_shape += sh[len(new_shape):i + 1] new_shape += sh[len(new_shape):i + 1]
new_shape[i] = theano.tensor.cast(d, 'int64') new_shape[i] = theano.tensor.cast(d, 'int64')
if new_shape: if new_shape:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论