pytorch/examples

VAE reconstruction loss (BCE)

Ouverte

#460 ouverte le 1 déc. 2018

 (2 commentaires) (3 réactions) (0 personne assignée)Python (9 429 forks)batch import
good first issue

Métriques du dépôt

Stars
 (21 634 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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.

Guide contributeur