facebookresearch / Pearl

A Production-ready Reinforcement Learning AI Agent Library brought by the Applied Reinforcement Learning team at Meta.
MIT License
2.67k stars 165 forks source link

custom network issue #75

Closed jyan-R closed 7 months ago

jyan-R commented 8 months ago

When using SAC, if I set actor net to customize network inherit from DynamicActionActorNetwork, the following code will lead to incorrect network shape for the actor.

https://github.com/facebookresearch/Pearl/blob/f5b09450e9e9f3734742871167597f469dfb7503/pearl/policy_learners/sequential_decision_making/actor_critic_base.py#L113C1-L127C10

It maybe better to replace is with issubclass()

rodrigodesalvobraz commented 7 months ago

Good catch, thank you. We are following your suggestion. The change should be reflected to GitHub today or tomorrow.