Skip to content

gradient question about GatherScatterMode #17675

Answered by hawkinsp
Dong-Jiahuan asked this question in Q&A
Discussion options

You must be logged in to vote
  1. Only PROMISE_IN_BOUNDS mode has incorrect gradients. The other modes will have correct gradients.
  2. Exactly what PROMISE_IN_BOUNDS does is up to the implementation, but it's is equivalent to CLIP in the forwards direction, while its gradient is equivalent to DROP. (These don't match, which is why the result isn't correct.)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Dong-Jiahuan
Comment options

Answer selected by Dong-Jiahuan
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