提交 8455b635 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Allow uint types for shapes

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