pytorch/examples

VAE reconstruction loss (BCE)

Open

#460 建立於 2018年12月1日

在 GitHub 查看
 (2 留言) (3 反應) (0 負責人)Python (9,429 fork)batch import
good first issue

倉庫指標

Star
 (21,634 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南