提交 6a3c9ac7 authored 作者: Frederic's avatar Frederic

assert the right number of dimensions in the perform.

上级 09e32867
...@@ -2329,6 +2329,7 @@ class SpecifyShape(Op): ...@@ -2329,6 +2329,7 @@ class SpecifyShape(Op):
def perform(self, node, inp, out_): def perform(self, node, inp, out_):
x, shape = inp x, shape = inp
out, = out_ out, = out_
assert x.ndim == shape.size
assert numpy.all(x.shape == shape), ("got shape", x.shape, assert numpy.all(x.shape == shape), ("got shape", x.shape,
"expected", shape) "expected", shape)
out[0] = x out[0] = x
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论