I’m not familiar with PyTorch Geometric, but in case you can precompute the targets and each sample has one corresponding target class, you could take a look at this code snippet, which explains the usage of the WeightedRandomSampler
.
I’m not familiar with PyTorch Geometric, but in case you can precompute the targets and each sample has one corresponding target class, you could take a look at this code snippet, which explains the usage of the WeightedRandomSampler
.