piiswrong commented on a change in pull request #7494: gluon save/load 
optimizer states
URL: https://github.com/apache/incubator-mxnet/pull/7494#discussion_r134631033
 
 

 ##########
 File path: python/mxnet/optimizer.py
 ##########
 @@ -969,12 +969,21 @@ def sync_state_context(self, state, context):
 
     def set_states(self, states):
         """Sets updater states."""
-        self.states = pickle.loads(states)
+        states = pickle.loads(states)
+        if isinstance(states, tuple) and len(states) == 2:
 
 Review comment:
   This is bad, add an argument
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to