1
0
mirror of https://github.com/gryf/coach.git synced 2026-04-29 20:14:09 +02:00

Add is_on_policy property to agents (#480)

This commit is contained in:
Guy Jacob
2021-05-06 18:02:02 +03:00
committed by GitHub
parent 06bacd9de0
commit 9106b69227
21 changed files with 86 additions and 1 deletions
@@ -91,6 +91,10 @@ class PolicyGradientsAgent(PolicyOptimizationAgent):
self.returns_variance = self.register_signal('Returns Variance')
self.last_gradient_update_step_idx = 0
@property
def is_on_policy(self) -> bool:
return True
def learn_from_batch(self, batch):
# batch contains a list of episodes to learn from
network_keys = self.ap.network_wrappers['main'].input_embedders_parameters.keys()