learn2learn icon indicating copy to clipboard operation
learn2learn copied to clipboard

The lightning_maml method has a risk of out of memory

Open lian-xiao opened this issue 1 year ago • 0 comments

In the pytorch-lightning2.2.1 environment, Maml is implemented by wrapping the meta_learn function with torch.enable_grad, which makes the model's outer losses uncomputed during validation, resulting in memory overflow. This can be avoided by the peripheral loss calculation procedure of the torch.no_grad() packaging validation procedure.

lian-xiao avatar Jun 27 '24 03:06 lian-xiao