提交 13307611 编写于 作者: S SunAhong1993

fix the onnx decoder

上级 ff5cdb1a
......@@ -117,7 +117,13 @@ class ONNXGraphDataNode(GraphNode):
if isinstance(self.layer, ValueInfoProto):
values = self.layer.type.tensor_type.shape.dim
out_shapes = list()
out_shapes.append([dim.dim_value for dim in values])
shape = list()
for dim in values:
if dim.dim_value == 0:
shape.append(-1)
else:
shape.append(dim.dim_value)
out_shapes.append(shape)
return out_shapes
else:
values = self.layer.dims
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册