You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix VAE hyperparameter component importance TODO #208
@rasbt, you raised this this comment (see here for context):
I am not sure this is correct, why would a larger number of, e.g., pixels make the reconstruction loss more important? I suppose this is true if we just sum over the pixel-wise differences, but if we average, e.g., using MSE, I am not convinced this is true. Please comment.
Would you mind taking the lead on resolving this? I'm not sure I fully understand either the sentence in question (which should be clarified regardless of whether it is correct) nor the question itself.
I agree that it is possible to do it with averaging, but I would argue that it is rarely done in practice. Averaging would add an additional step that could slow the computation.
Also, here are a number of Keras and pytorch examples, in which this is not done and these are among the first hits.
While we might wish that something would be trivial and desirable, it doesn't mean that it is the case :)
reduction (string, optional) – Specifies the reduction to apply to the output: 'none' | 'mean' | 'sum'. 'none': no reduction will be applied, 'mean': the sum of the output will be divided by the number of elements in the output, 'sum': the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: 'mean'
Looks like for pytorch the default does make this mean. It's less clear for me with the keras examples. I agree that I'm not sure it merits a mention as a specific case, but "look under the hood and understand what you're doing" might make sense. I didn't know the answer to this and had to go looking, and it's not clear to me what would happen in the keras case with the example code.
How in the weeds will this point be vs keeping the discussion at a higher level? Will we have to refer readers to code examples to get the point across?
I would suggest we don't make claims such as "a larger number of, e.g., pixels make the reconstruction loss more important" because it only applies in special cases (mean vs sum) and would be too much detail for a high level overview as @pstew pointed out.
How in the weeds will this point be vs keeping the discussion at a higher level? Will we have to refer readers to code examples to get the point across?
Ideally not in the weeds if at all possible. I would really prefer to avoid any code examples since, as the paper ages, they are usually out of date or in a different language than what the person wants.
I think we are in agreement that we should say something general about understanding the nuances of implementation without specifically discussing the nuances of a single implementation. Did I summarize that correctly?
Activity
cgreene commentedon Jun 4, 2020
I agree that it is possible to do it with averaging, but I would argue that it is rarely done in practice. Averaging would add an additional step that could slow the computation.
Also, here are a number of Keras and pytorch examples, in which this is not done and these are among the first hits.
While we might wish that something would be trivial and desirable, it doesn't mean that it is the case :)
cgreene commentedon Jun 4, 2020
https://pytorch.org/docs/master/nn.functional.html#binary-cross-entropy
Looks like for pytorch the default does make this mean. It's less clear for me with the keras examples. I agree that I'm not sure it merits a mention as a specific case, but "look under the hood and understand what you're doing" might make sense. I didn't know the answer to this and had to go looking, and it's not clear to me what would happen in the keras case with the example code.
pstew commentedon Jun 4, 2020
How in the weeds will this point be vs keeping the discussion at a higher level? Will we have to refer readers to code examples to get the point across?
rasbt commentedon Jun 4, 2020
I would suggest we don't make claims such as "a larger number of, e.g., pixels make the reconstruction loss more important" because it only applies in special cases (mean vs sum) and would be too much detail for a high level overview as @pstew pointed out.
Benjamin-Lee commentedon Jun 5, 2020
Ideally not in the weeds if at all possible. I would really prefer to avoid any code examples since, as the paper ages, they are usually out of date or in a different language than what the person wants.
cgreene commentedon Jun 5, 2020
I think we are in agreement that we should say something general about understanding the nuances of implementation without specifically discussing the nuances of a single implementation. Did I summarize that correctly?
Benjamin-Lee commentedon Jun 5, 2020
Yes, agreed.
cgreene commentedon Sep 16, 2020
closed by #217