Skip to content

Commit

Permalink
fixed bad function call in 01 and 02. Added model saving before figur…
Browse files Browse the repository at this point in the history
…e draw
  • Loading branch information
qfettes committed Feb 14, 2019
1 parent 2fe6e39 commit b805764
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 01.DQN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion 02.NStep_DQN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions dqn_devel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b805764

Please sign in to comment.