You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2021/04/08 18:30:44 UTC

[incubator-mxnet] branch v1.x updated: [v1.x] fix onnx type inference issue (#20130)

This is an automated email from the ASF dual-hosted git repository.

zha0q1 pushed a commit to branch v1.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.x by this push:
     new a2af352  [v1.x] fix onnx type inference issue (#20130)
a2af352 is described below

commit a2af352ca8a41e948641739b82a78ecd654b8840
Author: Zhaoqi Zhu <zh...@gmail.com>
AuthorDate: Thu Apr 8 11:28:12 2021 -0700

    [v1.x] fix onnx type inference issue (#20130)
    
    * fix type inference issue
    
    * Update _export_onnx.py
---
 python/mxnet/onnx/mx2onnx/_export_onnx.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/mxnet/onnx/mx2onnx/_export_onnx.py b/python/mxnet/onnx/mx2onnx/_export_onnx.py
index 375e753..8bcb7a6 100644
--- a/python/mxnet/onnx/mx2onnx/_export_onnx.py
+++ b/python/mxnet/onnx/mx2onnx/_export_onnx.py
@@ -50,6 +50,7 @@
 import logging
 import json
 
+import numpy as np
 from mxnet import ndarray as nd
 
 
@@ -290,7 +291,7 @@ class MXNetGraph(object):
         class NodeOutput:
             def __init__(self, name, dtype):
                 self.name = name
-                self.dtype = dtype
+                self.dtype = np.dtype(dtype)
 
         initializer = []
         all_processed_nodes = []