DataLoader creates mini-batches with batch_size.
torch.utils.data.DataLoader(dataset, batch_size=100, shuffle=True)
DataLoader creates mini-batches with batch_size.
torch.utils.data.DataLoader(dataset, batch_size=100, shuffle=True)
Yes, right now I am using batch_size=300
Iâd suggest doing some napkin math to look at the size of your data vs. the memory bandwidth that you have between CPU and GPU RAM. 3 hidden layers of 512 parameters is what, order a million operations per sample for the forward pass? Compare that to your memory needs to get the inputs and outputs to/from the GPU, and I wouldnât be surprised if youâre just not doing enough to keep the GPU busy while the next batch of samples gets copied in.
Mr. Stevens has a good point here â OP, you donât mention how many GPUs you have / what size they are (1 GB? 10 GB?) â 1% util means different things based on GPU size.
My advice â
Maybe stupid suggestion, but did you move your data and model to GPU?