Solved by ptrblck in post #2 
              
              
                If you are not running the code in a with torch.no_grad() block, you will store the whole computation graph in the list for each prediction. 
Use prediction_list.append(prediction.detach()) to store the tensor only (and use the no_grad() guard to save more memory, if you don’t need to calculate the …