Open prashnani opened 5 years ago
I may not be able to understand your question because I am not good at English.
To answer your question, adain_params is gamma and beta values obtained from MLP. (The author code is mean, std, but the article is written as gamma, beta.)
Use adain_params for the residual block value using AdaptiveInstanceNorm2d in weight, bias
At this time, gamma and beta are not different for each layer. Gamma, beta with the same value obtained from the MLP.
If you do not understand, you can ask me again, I'm fine.
I think original author's code has not different gamma, beta.. SAME !
Because assign_adain_params
takes gamma and beta from the adain_params whose values are fixed while for the for statement
.
Thanks for your reply! Perhaps I am missing something...here is how I understood it:
In the original author code, the num_adain_params returned by get_num_adain_params function is 4096. That is, there are total 4096 parameters for adaIN operation.
These 4096 parameters in the original author code represent the total number of gamma and beta values of each of the 256 feature maps of 4 residual blocks of the decoder. That is, 4096 = 256 (number of feature maps) 4 (number of residual blocks) 2 (number of conv layers per residual block) * 2 (gamma and beta). These 4096 entries are then assigned to their respective residual block by assign_adain_params function.
In your current code, the number of adaIN parameters are 256 for gamma + 256 for beta (total 512 adain_params).
So I was a bit confused by this difference (512 vs 4096 adaIN parameters). Perhaps 512 is the intended choice of your implementation.
Hi, thanks for this Tensorflow implementation!
I was wondering if there is an error in the way adaptive instance normalization is performed in the generator (line 135 in MUNIT.py)?
In the original code by the authors, it seems that they compute mu and sigma for each of the layers of residual blocks of decoder (see assign_adain_params - line 130 in networks.py ). But in your code, it seems like mu and sigma are the same across all of the residual blocks. Could you please clarify?