Comparison of methods of Conditioning
Created on June 30|Last edited on July 7
Comment
- dense_input_condition = Concatenation happens at Input, after passing through a Dense layer and Reshaped
- original_condition = Concatenation of Input image and Condition before it gets passed to the Encoder (using a custom train_step() function in Keras)
- dense_bottleneck_condition = Concatenation happens at the Dense layer towards the 'end' of the encoder (before 'mu' and 'log_var' layers)
All runs have a latent dimension = 2 and KL_coefficient = 1.

Training
Comments
These results might be attributed to randomness alone, in case it's worth it I can run more experiments with the same results
- Training losses seem comparable between the two methods, maybe the second method (dense_condition) presents more variance in the validation KL_loss but the training KL_loss stabilized better.
- The aggregated embedding seems to be more separated in the dense_condition method, however this shouldn't be too informative
- The embedding conditioned to each class seems to be comparable between the two methods (they are not well regularized but the encoding dimension in 2)
- The reconstruction quality seems similar
- The second method presented some corrupted images in the Generations and in the interpolation of the 2D latent space
- A lot of difference in Runtime. Original method ran for 2h 26min while dense condition for only 54min (even though the number of parameters is practically the same). I'm running the code on CPU only, so the additional convolutions might slow the process a lot? This might also be due to the first method overriding the train function in Keras?
original_condition

dense_bottleneck_condition

dense_input_condition

Add a comment


