Hi, you can detach a tensor from the computational graph with latent2.detach()
. You can find more details here.
loss = F.mse_loss(x2, x) + F.mse_loss(latent2.detach(), latent)
Hi, you can detach a tensor from the computational graph with latent2.detach()
. You can find more details here.
loss = F.mse_loss(x2, x) + F.mse_loss(latent2.detach(), latent)