Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding custom network #319

Open
SourabhPrasad opened this issue Jan 14, 2025 · 3 comments
Open

Question regarding custom network #319

SourabhPrasad opened this issue Jan 14, 2025 · 3 comments

Comments

@SourabhPrasad
Copy link

Hi,
I’m working on a custom network that includes an Actor MLP, a Critic MLP, and an extra MLP (let’s call it MLP-B). The setup involves feeding the output of MLP-B into the Actor MLP. On top of that, I want to train MLP-B using the PPO algorithm while also training it separately with regression. Is it possible to set up an architecture like this? If so, I’d really appreciate any advice on how to make it happen.
Thanks!

@Denys88
Copy link
Owner

Denys88 commented Jan 17, 2025

Yes it is possible I think we have nearest example. Please take a look at the aux_loss support implementation here: 7f9cd1e

@SourabhPrasad
Copy link
Author

SourabhPrasad commented Jan 20, 2025

Hey @Denys88.
Thanks for the reply and for pointing me towards aux_loss. I have taken a look at 7f9cd1e and TestNetWithAuxLoss class in test_network.py and I had a follow-up question.
In my implementation, the actor, critic and MLP-B use different architectures and are asymmetric. How can I implement such a model using the network builder, Would you suggest building such a network using NetworkBuilder.BaseNetwork or A2CBuilder

@Denys88
Copy link
Owner

Denys88 commented Jan 28, 2025

@SourabhPrasad there are some very simple examples without a2c. a2c is a monster where I supported everything I want to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants