How to use RandomSampler - PyTorch Forums
discuss.pytorch.org › t › how-to-use-randomsamplerFeb 01, 2020 · Ubuntu 18.04 or Mac OS Catalina, Python 3.7, PyTorch 1.4.0. I try to sample from a dataset using predefined indices, SubsetRandomSampler works as expected, RandomSampler does not work as expected, I check the source code, and it seems RandomSampler is just using the length of the data_source argument and the samples has nothing to do with data_source, can anyone help me understand what is the ...
SubsetRandomSampler for every epoch - PyTorch Forums
discuss.pytorch.org › t › subsetrandomsampler-forApr 17, 2019 · There is CNN now imagenet pre-trained. I want to do some fine-tuning (re-training) on CNN. I do not think I need to run the imagenet training set at all, so I want to train every 100,000 samples per epoch. If I implement the following, is 100,000 samples sampled every epoch differently? ... # Weight training def weight_train(epoch): print('\ Weight Training Epoch: %d' % epoch) train_sampler ...