def __setstate__(self, state): Serializable.__setstate__(self, state['init_args']) # tf.get_default_session().run(tf.global_variables_initializer()) self.set_params(state['network_params'])
def __setstate__(self, state): Serializable.__setstate__(self, state['init_args']) self.policy.__setstate__(state['policy']) self.optimizer.__getstate__(state['optimizer'])
def __setstate__(self, state): Serializable.__setstate__(self, state['init_args']) self.set_params(state['network_params']) [obs_filter.set_params(params) for obs_filter, params in zip(self.obs_filters, state['filter'])]