Calling Variable on G.data resets the loss tree. I think pytorch might throw an error if you tried that loss.
Maybe you can try the cholesky decomposition as mentioned in this post:
Calling Variable on G.data resets the loss tree. I think pytorch might throw an error if you tried that loss.
Maybe you can try the cholesky decomposition as mentioned in this post: