anvoynov / GANLatentDiscovery

The authors official implementation of Unsupervised Discovery of Interpretable Directions in the GAN Latent Space
416 stars 52 forks source link

Learnable directions question #21

Open chi0tzp opened 3 years ago

chi0tzp commented 3 years ago

Hi @anvoynov, I have a question regarding the learnable (interpretable) directions. More specifically, regarding LatentDeformator, in order to learn the directions, you define an input dimension and an output dimension, both of which are set to be equal to directions_count as shown here, which of course can be different than the dimensionality of latent space.

However, precisely because the dimensionality of these directions needs to be equal to the dimensionality of the latent space (so as you can add shifts to latent codes), you fix their output dimension by padding zeros or by discarding the extra dimensions, as shown here.

My question is why you don't just set out_dim to be equal to shift_dim in the first place? That is, instead of padding with zeros or cutting out extra dimensions, to learn exactly how many dimensions you really need. In my opinion this is not a detail and I would expect that this could affect training somehow.

Is there a particular reason for doing so?