1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

Adding parameteres, checking transitions before training

This commit is contained in:
Ajay Deshpande
2018-10-08 14:49:46 -07:00
committed by zach dwiel
parent 0f46877d7e
commit b285a02023
5 changed files with 18 additions and 30 deletions

View File

@@ -563,9 +563,12 @@ class Agent(AgentInterface):
if step_method.__class__ == EnvironmentEpisodes:
should_update = (self.current_episode - self.last_training_phase_step) >= step_method.num_steps
should_update = should_update and self.call_memory('length') > 0
elif step_method.__class__ == EnvironmentSteps:
should_update = (self.total_steps_counter - self.last_training_phase_step) >= step_method.num_steps
should_update = should_update and self.call_memory('num_transitions') > 0
if wait_for_full_episode:
should_update = should_update and self.current_episode_buffer.is_complete
else: