Could you try to use torch.sparse.mm 22, which is the equivalent of torch.mm for a sparse and dense matrix?
Also, could you post all shapes and values of the tensors so that we can reproduce this error?
The error message isn’t really helpful in this case.