tolstikhin / wae

Wasserstein Auto-Encoders
BSD 3-Clause "New" or "Revised" License
506 stars 90 forks source link

num_filters or num_units ? #9

Open emnajaoua opened 5 years ago

emnajaoua commented 5 years ago

Hi,

Thank you so much for this nice implementation. I am trying to readapt it to my input dataset. However, I didn't get this parameter which is num_units or num_filters. Do you mean by that number of neurons ? According to what you chose 1024 ? It is not clear for me, because I assume that the encoder-decoder architecture use not the same number of units for each layer. So for the encoder , the number of units decreases from the dimension of the image which is 28*28 to the latent dimension. For the decoder, it is the opposite process. I assumed this because Wasserstein autoencoders are quite similar to the variational autoencoder but without the discriminator. Can I know why you assume that all the layers have the same number of units ?

Thank you in advance.

tolstikhin commented 5 years ago

Hello,

you are right and we are indeed not using same number of units per layer. the hyperparameter you mentioned sets the number of filters in the "largest" layer, and then indeed in encoder and decoder the number of units are increasing / decreasing progressively, with the largest number being controlled by the hyperparameter. You can see the details in models.py.

tolstikhin commented 5 years ago

However, if you mean d_num_filters --- this hyperparameter controls the number of hidden units in the discriminator network, which is a fully connected DNN with same number of units per layer. Note that the discriminator in WAE-GAN is acting in the latent space, where convolutions are not necessary.