From f7d7ed3fa7095b560e34210e709c1c8b7b7877e5 Mon Sep 17 00:00:00 2001 From: Athanasios Theocharis Date: Tue, 6 Dec 2022 17:51:52 +0100 Subject: [PATCH] Update custom_policy.rst (#1183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update custom_policy.rst * Update changelog Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com> Co-authored-by: Antonin RAFFIN Co-authored-by: Antonin Raffin --- docs/guide/custom_policy.rst | 6 +++--- docs/misc/changelog.rst | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/guide/custom_policy.rst b/docs/guide/custom_policy.rst index 1a3ae34..4ba3203 100644 --- a/docs/guide/custom_policy.rst +++ b/docs/guide/custom_policy.rst @@ -333,11 +333,11 @@ If your task requires even more granular control over the policy/value architect :return: (th.Tensor, th.Tensor) latent_policy, latent_value of the specified network. If all layers are shared, then ``latent_policy == latent_value`` """ - return self.policy_net(features), self.value_net(features) - + return self.forward_actor(features), self.forward_critic(features) + def forward_actor(self, features: th.Tensor) -> th.Tensor: return self.policy_net(features) - + def forward_critic(self, features: th.Tensor) -> th.Tensor: return self.value_net(features) diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 67b5591..619e1eb 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -50,6 +50,7 @@ Documentation: ^^^^^^^^^^^^^^ - Updated Hugging Face Integration page (@simoninithomas) - Changed ``env`` to ``vec_env`` when environment is vectorized +- Update custom policy documentation (@athatheo) Release 1.6.2 (2022-10-10) --------------------------