katerakelly/pytorch-maml

Questions about the implementation for inner loop

Closed this issue · 3 comments

Hi,

Thanks for sharing the code. I have questions about the implementation for inner loop:
Is there any reason for the special case of i == 0? Can we just use fast_weights for i == 0?

Thanks!

Thanks for the explanation!

Hi,
sorry to reopen this discussion. As you define the fast_weights to be same as the original weights, in here (

fast_weights = OrderedDict((name, param) for (name, param) in self.named_parameters())
):

fast_weights = OrderedDict((name, param) for (name, param) in self.named_parameters())
for i in range(self.num_updates):

then there should already be a "pointer" to the original model parameters for computing the meta gradient. Thus, there should be no need to distinguish i==0. Do you think my observation is correct?
Thanks.