Skip to content

is it possible that from_module and to_module doesn't work well for LSTM modules? #1441

@roger-creus

Description

@roger-creus

Hello!

I am using this logic in my codebase, inspired from this

self.agent_inference = type(self.policy)(**inference_kwargs)
self.agent_inference_p = from_module(self.policy).data
self.agent_inference_p.to_module(self.agent_inference)

and while this works well for all policy classes in my project, if there is an LSTM inside the policy, then it stops working.

I have verified this is the only reason why the LSTM policies don't work, because when I comment out these 3 lines and use self.policy instead of self.agent_inference, the LSTM-equipped agents actually learn well.

What is going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions