pytorch/examples

VAE reconstruction loss (BCE)

オープン

#460 opened on 2018/12/01

 (2 件のコメント) (3 件のリアクション) (0 人の担当者)Python (9,429 件のフォーク)batch import
good first issue

Repository metrics

Stars
 (21,634 個のスター)
PR merge metrics
 (PR metrics pending)

説明

The current implementation uses

F.binary_cross_entropy(recon_x, x.view(-1, 784), reduction='sum')

as the reconstruction loss. The image x has pixel values in [0,1]. This is not the same as Bernoulli log likelihood. The images would have to binarized.

In Ladder Variational Autoencoders by Sonderby et al, they binarize the images as a Bernoulli sample after each epoch.

コントリビューターガイド