[RLlib] Attention Nets: tf (#12753)

This commit is contained in:
Sven Mika
2020-12-20 20:22:32 -05:00
committed by GitHub
parent e715ade2d1
commit b2bcab711d
26 changed files with 567 additions and 561 deletions
-4
View File
@@ -50,8 +50,6 @@ def compute_advantages(rollout: SampleBatch,
processed rewards.
"""
rollout_size = len(rollout[SampleBatch.ACTIONS])
assert SampleBatch.VF_PREDS in rollout or not use_critic, \
"use_critic=True but values not found"
assert use_critic or not use_gae, \
@@ -90,6 +88,4 @@ def compute_advantages(rollout: SampleBatch,
rollout[Postprocessing.ADVANTAGES] = rollout[
Postprocessing.ADVANTAGES].astype(np.float32)
assert all(val.shape[0] == rollout_size for key, val in rollout.items()), \
"Rollout stacked incorrectly!"
return rollout