leezu commented on a change in pull request #19417:
URL: https://github.com/apache/incubator-mxnet/pull/19417#discussion_r520887731



##########
File path: python/mxnet/gluon/block.py
##########
@@ -1381,12 +1381,12 @@ def export(self, path, epoch=0, remove_amp_cast=True):
                                       .format(name=name), stacklevel=3)
                     else:
                         arg_dict['aux:%s'%name] = param._reduce()
-        save_fn = _mx_npx.save if is_np_array() else ndarray.save
+        save_fn = _mx_npx.savez if is_np_array() else ndarray.save

Review comment:
       Sharing parameters between models expected ndarray and NDArray may not 
be supported. This would trigger error at model runtime as numpy operator 
expect ndarray but may get NDArray.
   
   With respect to the `nd.save` function. It calls the same C-API as the prior 
implementation of `npx.save`. Thus saving ndarrays via `nd.save` works (as 
ndarray is a subclass of NDArray)




----------------------------------------------------------------
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:
[email protected]


Reply via email to