Skip to content

Commit

Permalink
Fix MultiACKTR
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed Jan 26, 2023
1 parent 87a29b5 commit 5239aa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myGym/stable_baselines_mygym/multi_acktr.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _train_step(self, obs, states, rewards, masks, actions, values, update, mode
# the stepsize was automatically tuned computing the kl div
# and comparing it to the desired one
for _ in range(len(obs)):
current_lr = model.learning_rate_schedule.value()
current_lr = self.learning_rate_schedule.value()

td_map = {
model.train_model.obs_ph: obs,
Expand All @@ -278,7 +278,7 @@ def _train_step(self, obs, states, rewards, masks, actions, values, update, mode

if writer is not None:
# run loss backprop with summary, but once every 10 runs save the metadata (memory, compute time, ...)
if model.full_tensorboard_log and (1 + update) % 10 == 0:
if self.full_tensorboard_log and (1 + update) % 10 == 0:
run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE)
run_metadata = tf.RunMetadata()
summary, policy_loss, value_loss, policy_entropy, _ = model.sess.run(
Expand Down

0 comments on commit 5239aa0

Please sign in to comment.