Пример #1
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d.update({
         "policy_params": self._training_policy.get_param_values(),
         "qf_params": self._qf_eval.get_param_values(),
     })
     return d
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     global load_params
     if load_params:
         print("debug, using load params")
         d["params"] = self.get_param_values(all_params=True)
     print("debug, shape of d params", np.shape(d['params']))
     return d
 def __getstate__(self):
     if config.TF_NN_SETTRACE:
         ipdb.set_trace()
     d = Serializable.__getstate__(self)
     global load_params
     if load_params:
         d["params"] = self.get_param_values()
     return d
Пример #4
0
    def __getstate__(self):
        """Get Serializable state of the RLALgorithm instance."""

        state = Serializable.__getstate__(self)
        state.update({
            'qf-params': self.qf.get_param_values(),
            'policy-params': self.policy.get_param_values(),
            'pool': self.pool.__getstate__(),
            'env': self.env.__getstate__(),
        })
        return state
Пример #5
0
    def __getstate__(self):
        """Get Serializable state of the RLALgorithm instance."""

        d = Serializable.__getstate__(self)
        d.update({
            'qf-params': self._qf.get_param_values(),
            'policy-params': self._policy.get_param_values(),
            'pool': self._pool.__getstate__(),
            'env': self._env.__getstate__(),
        })
        return d
Пример #6
0
    def __getstate__(self):
        """Get Serializable state of the RLALgorithm instance."""

        state = Serializable.__getstate__(self)
        state.update({
            'qf-params': self.qf.get_param_values(),
            'policy-params': self.policy.get_param_values(),
            'df-params': self.df.get_params_internal(),
            'pool': self.pool.__getstate__(),
            'env': self.env.__getstate__(),
        })
        return state
Пример #7
0
    def __getstate__(self):
        """Get Serializable state of the RLALgorithm instance."""

        d = Serializable.__getstate__(self)
        d.update({
            'actor-qf-params': [[qf.get_param_values() for qf in actor.arr_qf] for actor in self._arr_actor],
            'actor-target-qf-params': [[target_qf.get_param_values() for target_qf in actor.arr_target_qf] for actor in self._arr_actor],
            'actor-policy-params': [actor.policy.get_param_values() for actor in self._arr_actor],
            'actor-target-policy-params': [actor.targetpolicy.get_param_values() for actor in self._arr_actor],
            'actor-pool': [actor.pool.__getstate__() for actor in self._arr_actor],
            'env': [env.__getstate__() for env in self._env.envs],
        })
        return d
Пример #8
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     global load_params
     if load_params:
         d["params"] = self.get_param_values(all_params=True)
     return d
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["state"] = self.state
     return d
Пример #10
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["_reward_freq"] = self._reward_freq
     return d
Пример #11
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     global load_params
     if load_params:
         d["params"] = self.get_param_values()
     return d
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["params"] = self.get_param_values()
     return d
Пример #13
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["_obs_mean"] = self._obs_mean
     d["_obs_var"] = self._obs_var
     return d
Пример #14
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d.update({
         'params': self.get_param_values(),
     })
     return d
Пример #15
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["params"] = self.get_param_values()
     return d
Пример #16
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["state"] = self.state
     return d
Пример #17
0
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     d["_obs_mean"] = self._obs_mean
     d["_obs_var"] = self._obs_var
     return d
 def __getstate__(self):
     d = Serializable.__getstate__(self)
     return d