In IsaacGymEnvs demo, how can I reload the MLP .pth parameters in pytorch or libtorch?

if i want to use the policy that i trained in the isaac gym, for example anymal or go 1.

maybe i should reload .pth fill into mlp net. And i try to find the net that build by the rl_game lib.
the actor policy net structure with 5 layers (input num- 512-256-128-action number).

however, when i try to build a same structure and load the .pth, i failed, because the .th dict description(built by the rl_game lib in isaacgym demo) might be different with my MLP (with the same layer and node). so sad!

anyone can tell me, how can i reload net and .pth parameters?

my step:

  1. build a MLP with same structure with same node and layers in pytorch.
  2. load the .pth.

another question:
can i directly import the actor policy MLP build by rl_game? and how can i perfom the method?



i build a MLP, and i want to load the model parameter save by Rl_games.
but the output is different from the self.actions print in the isaac simulation!!!

i am so puzzled.

above is some information that i modified the name of parameter saved by rl_game lib, so that i can load the parameter into the same model built by myself.

anyone can tell me, how can i load the model correctly and execute inference?

check out this post:

Did you solve it? im facing the same problem. Please help me, thank you