pytorch/examples

VAE reconstruction loss (BCE)

Open

#460 geöffnet am 1. Dez. 2018

Auf GitHub ansehen
 (2 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)Python (9.429 Forks)batch import
good first issue

Repository-Metriken

Stars
 (21.634 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide