Hi, I am interested in how unused computational graphs are automatically garbage collected in pytorch. I used to use dynet (another dynamic NN library), where I can use renew_cg() to remove all previously created nodes every time I started creating a new graph for the current training example. However in pytorch, everything seems to be handled automatically, regardless whether I call __call__ of an nn.Module or directly calling the function that implements the computation. Is there any source code/documentation that I can refer to? Thanks!