-
Notifications
You must be signed in to change notification settings - Fork 151
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
How to use custom network? #301
Comments
https://github.com/Denys88/IsaacGymEnvs/blob/main/isaacgymenvs/learning/networks/ig_networks.py here is a good example how I tested pretty complex networks with IsaacGym. |
Not exactly your example, but here is a very similar Resnet network builder with RNN (LSTM) layers support. |
Thank you @Denys88 and @ViktorM for providing the examples and the pointer to the While waiting for the answer, I was also looking at the code in network builder and found They all seem to only accept So, I am planning to create a derived class of Please correct me if I've misunderstood anything. Looking forward to hearing your thoughts on this approach and any recommendations you might have! |
@ViktorM @Denys88 the example above assumes that you are using a frozen network. You can't optimise the weights of this network because So, this is only suitable for pre-trained networks and not end to end visual RL. |
Thanks for your comment @ankurhanda. I have a question about standardization breaking the compute graph for vision net. I decided to first implement a simpler version of my network illustrated like this:
where And my question would be: If I only use running statistics to standardize |
As long as you don't do anything to the CNN, you should be fine. Normalizing My main concern is if you want to do end-to-end optimising CNN weights. Current settings don't allow that because compute graph is broken during normalisation inside the rl_games/rl_games/algos_torch/models.py Line 50 in 2606eff
|
I am trying to do e2e learning to also optimize the CNN weights. Why does normalizing the input to a network with no grad break the compute graph? Could you share more details? I assume if the concatenated tensor of |
@ankurhanda I don't think we use torch.inference() in the code, can you point to the exact place. The example above: https://github.com/Denys88/rl_games/blob/master/rl_games/algos_torch/network_builder.py#L623 is for end2end training, we have configs Atari training from scratch: https://github.com/Denys88/rl_games/blob/master/rl_games/configs/atari/ppo_breakout_torch_impala.yaml It can easily be modified to load pre-trained weights and freeze them, or not, but the default variant is exactly for e2e training. |
I would like to use the following network for my project, but I am not sure how exactly to do it.
In the diagram,
x
,y
,z
come from the observation dictionary, anda
represents action,v
is the value.Thank you very much for considering my question and I look forward to the guidance.
The text was updated successfully, but these errors were encountered: