示例#1
0
 def restore(self, fn):
     checkpoint = torch_ext.load_checkpoint(fn)
     self.model.sac_network.actor.load_state_dict(checkpoint['actor'])
     self.model.sac_network.critic.load_state_dict(checkpoint['critic'])
     self.model.sac_network.critic_target.load_state_dict(
         checkpoint['critic_target'])
     if self.normalize_input:
         self.running_mean_std.load_state_dict(
             checkpoint['running_mean_std'])
示例#2
0
 def restore(self, fn):
     checkpoint = torch_ext.load_checkpoint(fn)
     self.set_full_state_weights(checkpoint)
示例#3
0
 def restore(self, fn):
     checkpoint = torch_ext.load_checkpoint(fn)
     self.model.load_state_dict(checkpoint['model'])
     if self.normalize_input:
         self.running_mean_std.load_state_dict(
             checkpoint['running_mean_std'])