Solved by albanD in post #2 
              
              
                Hi, 

Indexing operation is not differentiable with respect to the index. So no gradient will flow back bbxes. Is that expected?
Indexing operation is differentiable with respect to the indexed tensor. So if it requires grad, then the output will too, otherwise it won’t. You should not set it by han…