Solved by albanD in post #2 
              
              
                Hi, 
The problem is that you wrap your input in a Variable outside of the training loop. Thus all the buffers are kept. 
You should create your input as: inp = torch.rand(1, 1, 3, 3).cuda(). 
And inside your training loop: 
for i in tqdm(range(1000)):
  inp_var = Variable(inp)
  output = my_net(inp_…