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

fix bug with local_gpu_shape. Their is GPUShape that inherit from Shape and it…

fix bug with local_gpu_shape. Their is GPUShape that inherit from Shape and it should return the good value.
上级 e1fda94f
...@@ -2484,7 +2484,7 @@ def get_vector_length(v): ...@@ -2484,7 +2484,7 @@ def get_vector_length(v):
return join.vec_length(v) return join.vec_length(v)
except ValueError: except ValueError:
pass pass
if v.owner and v.owner.op == _shape: if v.owner and isinstance(v.owner.op, Shape):
return v.owner.inputs[0].type.ndim return v.owner.inputs[0].type.ndim
raise ValueError("length not known") raise ValueError("length not known")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论