Skip to content

Understanding the comment in Tutorial 02 about differentiating through NLSS vs TheseusLayer #556

Answered by luisenp
DanielTakeshi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @DanielTakeshi. This note refers to a somewhat subtle point that happens under the hood. It turns out that for this particular example, the derivative of the outer loss with respect to the learned parameter doesn't actually need derivative information of the NLLS optimization (e.g. , you can wrap the optimizer call with torch.no_grad() and you can still reduce the outer loss). You can see the associated discussion in #27. It's been a while since I looked at this example, but that's the main idea, IIRC.

I think the wording of this note might be a bit confusing, since it seems to contradict the written code.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DanielTakeshi
Comment options

Answer selected by DanielTakeshi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants