diff --git a/python/mxnet/contrib/onnx/onnx2mx/import_onnx.py b/python/mxnet/contrib/onnx/onnx2mx/import_onnx.py index a9b3e6b30852..d5071af0763d 100644 --- a/python/mxnet/contrib/onnx/onnx2mx/import_onnx.py +++ b/python/mxnet/contrib/onnx/onnx2mx/import_onnx.py @@ -200,6 +200,7 @@ def _parse_array(self, tensor_proto): if len(tuple(tensor_proto.dims)) > 0: np_array = to_array(tensor_proto).reshape(tuple(tensor_proto.dims)) else: + # If onnx's params are scalar values without dims mentioned. np_array = np.array([to_array(tensor_proto)]) return nd.array(np_array)