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

fix n_step_q_agent

This commit is contained in:
Zach Dwiel
2018-02-16 20:25:33 -05:00
parent 5cf10e5f52
commit e1ad86417f
3 changed files with 20 additions and 19 deletions

View File

@@ -20,17 +20,6 @@ from utils import *
import scipy.signal
def last_sample(state):
"""
given a batch of states, return the last sample of the batch with length 1
batch axis.
"""
return {
k: np.expand_dims(v[-1], 0)
for k, v in state.items()
}
# Actor Critic - https://arxiv.org/abs/1602.01783
class ActorCriticAgent(PolicyOptimizationAgent):
def __init__(self, env, tuning_parameters, replicated_device=None, thread_id=0, create_target_network = False):