Skip to content

Commit

Permalink
Fix DeterministicActionActorNetwork check
Browse files Browse the repository at this point in the history
Summary:
Classes were being checked for being `DeterministicActionActorNetwork` but the test should include its subclasses.

Suggeted by #75

Reviewed By: xuruiyang

Differential Revision: D55351197

fbshipit-source-id: 2b4d7e57313679629d37712972ea26cc053756ce
  • Loading branch information
rodrigodesalvobraz authored and facebook-github-bot committed Mar 26, 2024
1 parent e58d444 commit c6b74e0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ def __init__(
self._actor: nn.Module = actor_network_type(
input_dim=(
state_dim + self._action_dim
if actor_network_type is DynamicActionActorNetwork
if issubclass(actor_network_type, DynamicActionActorNetwork)
else state_dim
),
hidden_dims=actor_hidden_dims,
output_dim=(
1
if actor_network_type is DynamicActionActorNetwork
if issubclass(actor_network_type, DynamicActionActorNetwork)
else self._action_dim
),
action_space=action_space,
Expand Down

0 comments on commit c6b74e0

Please sign in to comment.