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



##########
File path: python/mxnet/gluon/block.py
##########
@@ -1271,8 +1275,13 @@ def export(self, path, epoch=0, remove_amp_cast=True):
             if name in arg_names:
                 arg_dict['arg:%s'%name] = param._reduce()
             else:
-                assert name in aux_names
-                arg_dict['aux:%s'%name] = param._reduce()
+                if name.endswith('running_mean') or 
name.endswith('running_var') \
+                    or name.endswith('moving_mean') or 
name.endswith('moving_var'):
+                    assert name in aux_names
+                    arg_dict['aux:%s'%name] = param._reduce()

Review comment:
       Where do we ensure that no aux parameter with a name different to 
`running_mean`, `running_var`, etc is missing from the resulting params file if 
`allow_extra` is `False`?




----------------------------------------------------------------
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