Skip to content

fori_loop and jacrev: it works ! but I thought it wasn't #14643

Answered by jakevdp
jecampagne asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the question! N here is known at compile time, because array shapes are static. If you had used an array value in place of N, then it would be dynamic and your function would not be reverse-mode differentiable.

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@jecampagne
Comment options

@jakevdp
Comment options

@jecampagne
Comment options

@jakevdp
Comment options

@jecampagne
Comment options

Answer selected by jecampagne
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