Do you give both outputs to torchviz to get this? Or just one? You will see the graph for a given output. So if you give the output of a single forward, you’ll see the graph for a single forward.
Or you want to give your loss directly which should depend on both outputs.