Extracting graph structure for testing purposes

I am new to PyTorch and I am building a slightly unconventional net, so I am not completely sure whether autograd is keeping track of the graphs in the way I expect it to, or whether something is going wrong in my code. I was wondering whether you had any recommendations on how one might go about extracting the graph that is being built and differentiated at each backward() call.

you can follow the .creator field of the output Variable to help build out the full graph. This format is changing next week, though (and I will have some notes for it)

1 Like