I forgot to mention that I am training and testing my model on two different machines. According to reproducibility docs I used both torch. "set_deterministic (d = True ) "and “torch.backends.cudnn.benchmark = False ” to force Pytorch to pick a deterministic set of algorithms but it does not seem to make any difference! To be honest I am not sure if I used these commands correctly as I just threw them into my code right before the for loop!