提交 a94d5406 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix the last test in python 32 bit. Keep constant shape as constant and not casted constant.

上级 eefbb4fd
......@@ -1336,7 +1336,11 @@ class ShapeFeature(object):
assert d.dtype in theano.tensor.discrete_dtypes, (node, d.dtype)
assert str(d.dtype) != 'uint64', node
new_shape += sh[len(new_shape):i + 1]
new_shape[i] = theano.tensor.cast(d, 'int64')
if isinstance(d, T.Constant):
casted_d = T.constant(d.data, dtype='int64')
else:
casted_d = theano.tensor.cast(d, 'int64')
new_shape[i] = casted_d
if new_shape:
# We replace the shape with wrong dtype by the one with
# 'int64'.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论