parameters: (self, states)
docstring: Sets updater states.
docstring_summary: Sets updater states.
docstring_tokens: Sets updater states .
function: def set_states(self, states):
          """Sets updater states."""
          states = pickle.loads(states)
          if isinstance(states, tuple) and len(states) == 2:
              self.states, self.optimizer = states
          else:
              self.states = states
          self.states_synced = dict.fromkeys(self.states.keys(), False)
function_tokens: def set_states ( self , states ) : states = pickle . loads ( states ) if isinstance ( states , tuple ) and len ( states ) == 2 : self . states , self . optimizer = states else : self . states = states self . states_synced = dict . fromkeys ( self . states . keys ( ) , False )