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

Extract .pt file from the .msh file #37

Open
Harry-maximum opened this issue Jul 9, 2024 · 2 comments
Open

Extract .pt file from the .msh file #37

Harry-maximum opened this issue Jul 9, 2024 · 2 comments

Comments

@Harry-maximum
Copy link

Hi! Recently I trained my own agent in a new robot env, but I find that it uses the mushroom rl so that it save the file format of .msh, so is there any methods I can change the .msh to .pt file?

@robfiras
Copy link
Owner

robfiras commented Jul 11, 2024

Hi!
after you load an agent with

from mushroom_rl.core import Agent
path = "your_path"
agent  = Agent.load(path)

You can access the Gaussian policy's mean network with agent.policy._mu.network and save it however you like. Instead of saving and reloading in .msh, you can access and save the mean network similarly during training.

@Harry-maximum
Copy link
Author

Harry-maximum commented Jul 12, 2024 via email

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