mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 11:10:20 +01:00
Enabling-more-agents-for-Batch-RL-and-cleanup (#258)
allowing for the last training batch drawn to be smaller than batch_size + adding support for more agents in BatchRL by adding softmax with temperature to the corresponding heads + adding a CartPole_QR_DQN preset with a golden test + cleanups
This commit is contained in:
@@ -133,7 +133,7 @@ class NECAgent(ValueOptimizationAgent):
|
||||
TD_targets = self.networks['main'].online_network.predict(batch.states(network_keys))
|
||||
bootstrapped_return_from_old_policy = batch.n_step_discounted_rewards()
|
||||
# only update the action that we have actually done in this transition
|
||||
for i in range(self.ap.network_wrappers['main'].batch_size):
|
||||
for i in range(batch.size):
|
||||
TD_targets[i, batch.actions()[i]] = bootstrapped_return_from_old_policy[i]
|
||||
|
||||
# set the gradients to fetch for the DND update
|
||||
|
||||
Reference in New Issue
Block a user