You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/05/21 19:41:42 UTC

[GitHub] [incubator-mxnet] MoisesHer commented on a change in pull request #20283: [v1.x] ONNX export for large model

MoisesHer commented on a change in pull request #20283:
URL: https://github.com/apache/incubator-mxnet/pull/20283#discussion_r637181015



##########
File path: python/mxnet/onnx/README.md
##########
@@ -63,6 +63,9 @@ Parameters:
         This is the old name of in_types. We keep this parameter name for backward compatibility
     input_shape : List of tuple
         This is the old name of in_shapes. We keep this parameter name for backward compatibility
+    large_model : Boolean
+        Whether to export a model that is larger than 2 GB. If true will save param tensors in seperate

Review comment:
       typo: seperate -> separate

##########
File path: python/mxnet/onnx/mx2onnx/_export_model.py
##########
@@ -83,6 +83,9 @@ def export_model(sym, params, in_shapes=None, in_types=np.float32,
         This is the old name of in_types. We keep this parameter name for backward compatibility
     input_shape : List of tuple
         This is the old name of in_shapes. We keep this parameter name for backward compatibility
+    large_model : Boolean
+        Whether to export a model that is larger than 2 GB. If true will save param tensors in seperate

Review comment:
       typo:  seperate -> separate

##########
File path: python/mxnet/onnx/README.md
##########
@@ -75,6 +78,9 @@ When the model has multiple inputs, all the input shapes and dtypes must be prov
 #### Dynamic Shape Input
 We can set `dynamic=True` to turn on support for dynamic input shapes. Note that even with dynamic shapes, a set of static input shapes still need to be specified in `in_shapes`; on top of that, we'll also need to specify which dimensions of the input shapes are dynamic in `dynamic_input_shapes`. We can simply set the dynamic dimensions as `None`, e.g. `(1, 3, None, None)`, or use strings in place of the `None`'s for better understandability in the exported onnx graph, e.g. `(1, 3, 'Height', 'Width')`
 
+#### Export Large Model
+Uses can set `large_model=True` to exoprt models that are larger than 2GB. In this case, all parameter tensors will be saved into seperate files along with the .onnx model file.

Review comment:
       typo: exoprt -> export, seperate -> separate




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org