Thanks a lot!
I need to sample a mini-batch out of the whole dataset, feed a classifier that mini-batch and update the weights of the classifier. If mini-batch sampling is possible, I can finish the task.
My PyTorch version is 0.4.0. If there is some mechanism to do that, it will be great