Is the memory really used or just in the cache?
Could you check the usage via torch.cuda.memory_allocated and torch.cuda.memory_cached?
If your model uses batch norm layers or other layers, which depend on the batch size, you won’t get the same results.
Also, in that case, the first approach might yield worse results, as a batch size of 2 might be too small to estimate the running stats properly.