maml-pytorch icon indicating copy to clipboard operation
maml-pytorch copied to clipboard

bug

Open naruya opened this issue 5 years ago • 1 comments

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) としなければならない。

naruya avatar Apr 22 '19 16:04 naruya

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.

frajem avatar May 14 '20 08:05 frajem