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
Basically, in the above line, we calculate sigma(x(1-x)) / (n^2). However, since we had calculated mean (mu) in the previous line, we could use mu in the calculation of variance.
Definition of variance is sigma((x-mu)^2) / n. So I was thinking something like below: mean = K.sum(masked_probs, axis=(1, 2)) / c_mask_size # (16x5) / (16,1) --> shape 16x5 var = K.sum((K.pow(masked_probs - mean, 2) * c_mask), axis=(1, 2)) / ( c_mask_size ) # (16x5) / (16,1) --> shape 16x5
In the above line, * c_mask sets to zero the irrelevant values outside the current class's mask.
So why not stick to the exact variance formula here? Am I missing something?
Thanks,
The text was updated successfully, but these errors were encountered:
Hi,
I have a question about variance in sr_loss. Could you please elaborate on why variance is calculated this way?
# Mean var of predicted distribution:
Basically, in the above line, we calculate
sigma(x(1-x)) / (n^2)
. However, since we had calculated mean (mu
) in the previous line, we could usemu
in the calculation of variance.Definition of variance is
sigma((x-mu)^2) / n
. So I was thinking something like below:mean = K.sum(masked_probs, axis=(1, 2)) / c_mask_size # (16x5) / (16,1) --> shape 16x5
var = K.sum((K.pow(masked_probs - mean, 2) * c_mask), axis=(1, 2)) / ( c_mask_size ) # (16x5) / (16,1) --> shape 16x5
In the above line,
* c_mask
sets to zero the irrelevant values outside the current class's mask.So why not stick to the exact variance formula here? Am I missing something?
Thanks,
The text was updated successfully, but these errors were encountered: