I'm not familiar with tensorflow, I want to change this code to pytorch. But I found that the graph of the gradients respect to interpolates data don't connect to the graph of the net. It's just a single variable. So if I plus gradient penalty to loss, it won't work, it won't backward error to net. So do the graph of gradients connect to the graph of net with tensorflow ?
I'm not familiar with tensorflow, I want to change this code to pytorch. But I found that the graph of the gradients respect to interpolates data don't connect to the graph of the net. It's just a single variable. So if I plus gradient penalty to loss, it won't work, it won't backward error to net. So do the graph of gradients connect to the graph of net with tensorflow ?