提交 860b3c3c authored 作者: Frederic's avatar Frederic

Added an assert.

上级 95dc982b
...@@ -971,6 +971,7 @@ class ShapeFeature(object): ...@@ -971,6 +971,7 @@ class ShapeFeature(object):
# 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, d.dtype
assert str(d.dtype) != 'uint64'
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论