rlworkgroup / garage

A toolkit for reproducible reinforcement learning research.
MIT License
1.84k stars 309 forks source link

About details of MAML Pytorch #2245

Open Zhikaiiii opened 3 years ago

Zhikaiiii commented 3 years ago

Hi, your code is a nice work but I am confused about some details of MAML Pytorch. In inner loop you update params of tasks and save it in all _params, so why do you repeat the process again in your outter loop like

   for task_samples, task_params in zip(all_samples, all_params):

        for i in range(self._num_grad_updates):    

            require_grad = i < self._num_grad_updates - 1 or set_grad

            self._adapt(task_samples[i], set_grad=require_grad)  

instead of use params in all _params directly, is there something I have missed? Much thanks to you if you can reply : )