Allow std logging for full and diagonal cov policies
This commit is contained in:
parent
74697e8773
commit
f184b88f19
@ -361,6 +361,10 @@ class PPO(GaussianRolloutCollectorAuxclass, OnPolicyAlgorithm):
|
||||
self.logger.record(
|
||||
"train/std", th.exp(self.policy.log_std).mean().item())
|
||||
if hasattr(self.policy, "chol"):
|
||||
if len(self.policy.chol.shape) == 1:
|
||||
self.logger.record(
|
||||
"train/std", th.mean(self.policy.chol).mean().item())
|
||||
else:
|
||||
self.logger.record(
|
||||
"train/std", th.mean(th.diagonal(self.policy.chol, dim1=-2, dim2=-1)).mean().item())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user