fix number of updates for actor and critic_target networks #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The number of updates to the actor network, SAC's alpha value, and critic_target networks was too many (with default arg values) during the for-loop when step == args.init_steps. This is because "step" was given as an argument to the agent.update() function, instead of the index of the for loop. This argument is used on line 147 and 150 of SAC: https://github.com/nicklashansen/dmcontrol-generalization-benchmark/blob/a81df68838757ca55c19ac5f9fd8cd04bf8a942c/src/algorithms/sac.py#L147C1-L147C1
Depending on the value of args.init_steps and args.actor_update_freq this means that the actor network was either updated 0 times or args.init_steps times. (For default args values: the actor network was updated 1000 times, while it should only be updated 500 times, as args.actor_update_freq==2)