2
$\begingroup$

I've been reading this article about implementing a VAE with normalizing flows. What it's not clear to me, is which parameters are actually optimized using this approach. Should I only optimize the parameters of the flow part and not compute gradients of the loss function with respect to the weights of the encoder and decoder? If yes, why? How are the encoder and decoder used in this context?

$\endgroup$

1 Answer 1

1
$\begingroup$

You optimize the loss with respect to $\theta$ and $\phi$—which includes the parameters of the decoder, the encoder, and the flow model.

The source code in the blog post you've linked to answers the question. But so would a more academic reference on variational auto-encoders, like the Rezende and Mohamed paper that the blog post cites. In the future, those might be a better reference.

$\endgroup$
2
  • $\begingroup$ Thanks, the source code proposed in the blog post is ambiguous, as the definition of optimizer (where one usually specifies which parameters to be optimized) is not shown and this left me wondering. Also the three models Encoder, Decoder and Flow seem to be independent.. how is it possible then that a single optimizer is used? $\endgroup$ Apr 9, 2022 at 15:07
  • $\begingroup$ You're venturing closer to asking a coding question, which is off-topic here. But they're not independent. The value of the loss function depends on the encoder, decoder, and flow model. Therefore, you can optimize the loss with respect to the parameters of all three. $\endgroup$ Apr 9, 2022 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.