diff --git a/01.DQN.ipynb b/01.DQN.ipynb index dbff71e..7c695e7 100644 --- a/01.DQN.ipynb +++ b/01.DQN.ipynb @@ -279,7 +279,7 @@ " self.optimizer.step()\n", "\n", " self.update_target_model()\n", - " self.save_loss(loss.item(), frame)\n", + " self.save_td(loss.item(), frame)\n", " self.save_sigma_param_magnitudes(frame)\n", "\n", " def get_action(self, s, eps=0.1):\n", diff --git a/02.NStep_DQN.ipynb b/02.NStep_DQN.ipynb index bf5ed34..4df2faa 100644 --- a/02.NStep_DQN.ipynb +++ b/02.NStep_DQN.ipynb @@ -219,7 +219,7 @@ " self.optimizer.step()\n", "\n", " self.update_target_model()\n", - " self.save_loss(loss.item(), frame)\n", + " self.save_td(loss.item(), frame)\n", " self.save_sigma_param_magnitudes(frame)\n", "\n", " def get_action(self, s, eps=0.1):\n", diff --git a/dqn_devel.py b/dqn_devel.py index ef38fd4..afd85f1 100644 --- a/dqn_devel.py +++ b/dqn_devel.py @@ -106,6 +106,7 @@ episode_reward = 0 if frame_idx % 10000 == 0: + model.save_w() try: print('frame %s. time: %s' % (frame_idx, timedelta(seconds=int(timer()-start)))) model.flush_data() #make sure all data is flushed to files