If I’m not mistaken, the graph should be cleared once all attached tensors are deleted.
Since Python uses function scoping, you could wrap your calls in a function and the computation graph should be freed once you leave the function scope (if you don’t return the output tensor and keep it alive of course).