I have met the same error:
File “/home/lib/python3.6/site-packages/torch_geometric/utils/sparse.py”, line 18, in dense_to_sparse
index = tensor.nonzero().t().contiguous()
RuntimeError: nonzero is not supported for tensors with more than INT_MAX elements,   file a support request
When I set batch size to 20, it will run, but when I set batch size to 40 or 30, the error will be reported.
So I wonder if you have solved this problem?