New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions from aiueogawa #158
Comments
@aiueogawa Your questions are: @JiahuiYu Thanks for revised information. Q1: image How are the loss values are summed up into a single total loss. our final objective function for inpainting network is only composed of pixel-wise l1 reconstruction loss and SN-PatchGAN loss with default loss balancing hyper-parameter as 1 : 1. Q2: extracting background patches with strides to reduce the number of filters restricting the search range of contextual attention module from the whole image to a local neighborhood Q3: Q4: How many times did you iterate training of a discriminator at a training of a generator? Q5: The overall mask generation algorithm is illustrated in Algorithm 1. Additionally we can sample multiple strokes in single image to mask multiple regions. P.S. Can you please ask all your questions for one time instead of long mutual conversations? |
@aiueogawa My answers are @aiueogawa I have merged your questions and deleted redundant ones. Can you please ask all your questions for one time instead of long mutual conversations? So others who see this issue can have a clean view. Q1: Q2: Q3: @aiueogawa Q4: Q5: |
@JiahuiYu Thanks for all. I got it. |
@aiueogawa Great. Let me know if you still have questions. |
@JiahuiYu Is it OK to ask questions about DeepFillv1 in this issue? Or another issue is better? |
@aiueogawa Sure, feel free to ask any question here. I apologize for merging your questions without your permission. The reason is that I would like to keep that issue about DeepFill v2 clean and clear for others (which is also the reason why I keep that issue open). For any question you can post it here and this issue is opened for you. :) |
@aiueogawa And we can use long conversations here as well. |
@JiahuiYu Do not apologize to me. I appreciate that you provide a chance to ask questions. It seems that there are gaps between paper (DeepFillv1) and implementation in contextual attention. Q1. Q2. Q3.
. |
Q1: Q3: |
@JiahuiYu Thanks! I'm now reading your answer. BTW I'm sorry but I made mistake and sent the comment in edit. After several minutes, I updated it but maybe you miss it. |
@aiueogawa No problem. Q2: |
@aiueogawa No worry, you can ask any question anytime here and I will answer as soon as I see one. I feel you have investigated into the very details and I appreciate. Admittedly the implementation of contextual attention is complicated and I have tried to simplify it. But it seems all components including score fusing is necessary to have a good result. |
@JiahuiYu Thanks. I understand all of answers above well. BTW I have already read almost all of the previous issues in this repository so I do not need those already answered actually. Q4. |
Q4: I think what you mean is the softmax function instead of sigmoid function here. Good question! At the first glance it seems like we should do score fusion after softmax. However, if so, we will need to renormalize the fused scores to make the summation as one. Bt the way, you may wonder why in Q2 the renormalization is not important. It is because we have already masked foreground before softmax here so each one will have very small score values. Q4, however, is not in this case. |
@JiahuiYu It seems that in DeepFillv1 eLU activation is used for a generator, in DeepFillv2 did you still use eLU as activation? UPDATE: |
Yes. Unless explicitly mentioned in the DeepFill v2 paper, all settings are the same. |
@JiahuiYu
but in the answer of Q5 above, you said you used ELU activation. Which is right? |
Sorry for confusing. I have checked code and confirmed that we use ELU as activation. I have updated that issue as well. Thanks for pointing out. |
@aiueogawa Have you asked Q6 since I did see part of the question in my feeding stream. |
@JiahuiYu I had asked Q6 but I've noticed you'd already answered it in another thread, which is about typo in free-form mask algorithm, and I deleted the question. I'm sorry it was confusing. |
@aiueogawa No need to say sorry. You have contributed a lot by providing these questions and helping me fix errors and typos. Feel free to ask any question. :) |
@JiahuiYu |
@JiahuiYu UPDATE: |
Hi @aiueogawa Q7: Q8: |
I'm now working on reproducing a CelebAHQ experiment so image resolution is 512 x 512. UPDATE: |
@aiueogawa I see. I use image resolution of 256x256 for training thus the feature map is much smaller. |
@JiahuiYu |
@JiahuiYu |
Q9: Q10: |
@JiahuiYu |
@JiahuiYu adversarial_loss: the hinge loss ranging from 0 to 1 Is this behavior of discriminator loss preferable? UPDATE: This summary on TensorBoard is recorded from epoch1 to epoch40 with batch size 24. |
Q11: It is fine because for ADAM, EACH parameter have its own gradient statistics. When update, we designate which parameters are updating. In other words, using one optimizer or two are equivalent. Q12: The curves look good. |
@JiahuiYu |
@JiahuiYu |
Q13: Q14: |
@JiahuiYu
I'm confused about whether or not you use ones. Q14: |
@aiueogawa I saw why you are confused. In tensorflow, 'SAME' padding means that the same shape of input, instead of same values. For your reference, I have found the doc of tensorflow here:
Thus, we can use ones to indicate the border. Hope that solves your confusion. :) |
@JiahuiYu No, I know the behavior of 'SAME' and 'VALID' padding in TensorFlow.
This sounds you don't use ones in DeepFillv2. I don't tell which is right. |
We DO use ones. |
@JiahuiYu Thanks. And the original question of Q13 is rewritten as: Did you use ones not only in a generator but also a discriminator in DeepFillv2? |
Not in discriminator. |
@JiahuiYu |
I use non-deep learning method so there is no pretrained model for detection. Dlib is what I use as library to detect face landmarks. Default number of key points is used. |
@JiahuiYu |
Of course out-of-data, which means the network never see testing data. It has been answered in FQA in README. |
@aiueogawa Hi, I have opened a specific issue for you. You have asked five questions and I have answered all your questions. If you do not understand each one, please ask here and we can communicate here. Thanks.
The text was updated successfully, but these errors were encountered: