The result gives you a tensor containing indices for all nonzero occurrences in the shape [num_nonzeros, dims].
The first column (loc[:, 0]) gives the indices in dim0, the second one in dim1, etc.
As dsum has three dimensions, the second row stands for dsum[0, 1, 3].