Appreciate, and can i ask you another question?
I am trying to train encoder not only with the ‘gradient backpropagated from decoder’ but also with another loss(gradient) that been calculated in the latent space.
In order to do, before call

enc_loss = loss + backpropagated loss
enc_loss.backward()
opt_enc.step()

I need to get backpropagated loss from decoder.