ALRhub / deep_rl_for_swarms

86 stars 29 forks source link

How do I export model to a file? #7

Closed kirk0306 closed 4 years ago

kirk0306 commented 4 years ago

May I ask how to save the trained model to a local path? I tried to modify def save(self, path=none) in act_wrapper.py, but i didn't succeed.

kirk0306 commented 4 years ago

I don't know if I did it right, I just add

if rank == 0:
    logger.dump_tabular()
pi.save()

in trpo_mpi.py

xinyu-site commented 4 years ago

Have you solved this problem

I don't know if I did it right, I just add

if rank == 0:
    logger.dump_tabular()
pi.save()

in trpo_mpi.py

I try to save the trained model to a local path.Have you solved this problem?

kirk0306 commented 4 years ago

Have you solved this problem

I don't know if I did it right, I just add

if rank == 0:
    logger.dump_tabular()
pi.save()

in trpo_mpi.py

I try to save the trained model to a local path.Have you solved this problem?

Yes, there will be some models in the TEMP folder if you add pi.save() after that, it works for me :)