When evaluating your model, you need to wrap your code in with torch.no_grad() as explained here 15.
In the commented code, variable OneLoss is still in the graph. If you append it in Epoch["Train"]["Loss"], a new graph is saved after every iteration. I guess that’s probably the reason of increasing memory.
Best