question about test
Closed this issue · 5 comments
Hi,
Apologize me if the question is a little dumb. But I can't figure out what's going on in test.py. Is there any learning phase in it? If not how can I test gradient update and if so where does model learn?
MultiTaskSampler
, which is responsible for sampling the trajectories, is doing adaptation locally in each worker.
pytorch-maml-rl/maml_rl/samplers/multi_task_sampler.py
Lines 251 to 275 in 0c2c7dd
So in
test.py
, you do get both trajectories before and after adaptation with the simple call to MultiTaskSampler
. And with a few changes to test.py
you can even use different number of gradient steps for adaptation by changing num_steps
in your call to sampler.sample()
.Thanks, That was really helpful.
What is the environment? Making sure you get better performance with a larger number of gradient steps at test time is not something I tested.
Sorry for bothering you. It was my mistake. I found out if I lower the learning rate at both test and train time I can get better performance. (my environment is half_cheetah_vel)