Add support for VecEnvs
This commit is contained in:
parent
6e79fce9ae
commit
b2384e183c
@ -202,6 +202,8 @@ class BetterRolloutBuffer(RolloutBuffer):
|
|||||||
"log_probs",
|
"log_probs",
|
||||||
"advantages",
|
"advantages",
|
||||||
"returns",
|
"returns",
|
||||||
|
"means",
|
||||||
|
"cov_decomps"
|
||||||
]
|
]
|
||||||
|
|
||||||
for tensor in _tensor_names:
|
for tensor in _tensor_names:
|
||||||
@ -227,8 +229,8 @@ class BetterRolloutBuffer(RolloutBuffer):
|
|||||||
self.actions[batch_inds],
|
self.actions[batch_inds],
|
||||||
self.values[batch_inds].flatten(),
|
self.values[batch_inds].flatten(),
|
||||||
self.log_probs[batch_inds].flatten(),
|
self.log_probs[batch_inds].flatten(),
|
||||||
np.squeeze(self.means[batch_inds], axis=1),
|
self.means[batch_inds],
|
||||||
np.squeeze(self.cov_decomps[batch_inds], axis=1),
|
self.cov_decomps[batch_inds],
|
||||||
self.advantages[batch_inds].flatten(),
|
self.advantages[batch_inds].flatten(),
|
||||||
self.returns[batch_inds].flatten(),
|
self.returns[batch_inds].flatten(),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user