maml-pytorch
maml-pytorch copied to clipboard
bug
manual_optimizeの次の箇所
faster_params = OrderedDict(
(name, param - self.lr*grad)
for ((name, param), grad) in zip(faster_params.items(), grads)
)
は、 if first_train_for_this_task
内では、 zip(master_params.items(), grads)
としなければならない。
Hello and thanks for this repository! Why do you need to specify whether it's the "first_train_for_this_task"? Cannot you define the faster_params before the loop, and then just use the following update formula:
faster_params = OrderedDict(
(name, param - self.lr*grad)
for ((name, param), grad) in zip(faster_params.items(), grads)
)
Thanks.