Пример #1
0
 def __getstate__(self):
     state = {
         'init_args': Serializable.__getstate__(self),
         'network_params': self.get_params(),
         'filter': [obs_filter.get_params() for obs_filter in self.obs_filters],
     }
     return state
Пример #2
0
 def __getstate__(self):
     state = dict()
     state['init_args'] = Serializable.__getstate__(self)
     print('getstate\n')
     print(state['init_args'])
     state['policy'] = self.policy.__getstate__()
     state['optimizer'] = self.optimizer.__getstate__()
     return state
Пример #3
0
 def __getstate__(self):
     state = {
         'init_args': Serializable.__getstate__(self),
         'network_params': self.get_param_values()
     }
     return state