Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more detail explanation for "create_graph=True" and "weight.fast" #40

Open
fikry102 opened this issue Sep 18, 2022 · 1 comment
Open

Comments

@fikry102
Copy link

LFTNet.py, "update model parameters according to model_loss"
meta_grad = torch.autograd.grad(model_loss, self.split_model_parameters()[0], create_graph=True) for k, weight in enumerate(self.split_model_parameters()[0]): weight.fast = weight - self.model_optim.param_groups[0]['lr']*meta_grad[k] meta_grad = [g.detach() for g in meta_grad]
What's the purpose of adding "create_graph=True"? Why the weight.fast is updated rather than weight?
Does this have anything to do with "ft_loss.backward()"?

  Could you please give me more detailed explanation? Thanks!
@fikry102
Copy link
Author

I create a QQ group whose group number is 693337454. Anyone interested in these problems is welcome to join in us for further dicussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant