Solved by Roj in post #5 
              
              
                Ah! You are correct: contrary to my initial impression, the gradients are not all null. The portion of the gradient tensor returned by print() was filled with zeros – unsurprisingly, since the elements of the mini-batch are sparse matrices – but there are indeed some non-zero elements buried in the …