提交 73b9de65 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Update the exception type for get_constant_value()

上级 3062a252
......@@ -461,7 +461,7 @@ class GpuAlloc(Op):
raise TypeError('Shape arguments must be integers', s)
try:
const_shp = tensor.get_constant_value(s)
except TypeError:
except tensor.NotConstantError:
const_shp = None
bcast.append(numpy.all(1 == const_shp))
otype = GpuArrayType(dtype=v.dtype, broadcastable=bcast)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论