If you continuously accumulate the results of variables, you never frees your computation graph.
A common error is to accumulate the total loss for an epoch/training as follows:
total_loss += loss

This actually holds your variables, avoiding you to ever free them. In this case, you should do instead (because you don’t want to backprop through the total_loss, only print its value)
total_loss += loss.data[0]