If the memory consumption is gradually increasing, I reckon you are saving/generating some variables between each epoch without releasing them. Check the code carefully If it’s not the case
Try the following on platform 1:
torch.backends.cudnn.enabled = False
Also separately maybe try:
torch.backends.cudnn.benchmark = True
This might help