Hi,
I’m afraid that the backward of the to_dense() does not create a sparse Tensor. And so it tried to create a full size Tensor 
The support for sparse Tensors is quite limited so we don’t usually create them in the backward to reduce the number of errors like “XXX op is not implemented for sparse Tensors”.