implementation of MinibatchStdDev
SaoYan opened this issue · comments
The official implementation is here.
-
It seems that in your implementation there are multiple options, which don't exist in the official code. May I ask why?
-
Your default option is "all", which points to this line. However, the size of vals here is 1x1xHxW, that is you keep the spatial dimension. But according to both the paper and the official code, vals should be one single value (the average over all channels and pixels).
-
In your option "group", the code is actually not correct.
vals = vals.view(self.n, self.shape[1] / self.n, self.shape[2], self.shape[3])
vals = th.mean(vals, 0, keepdim=True).view(1, self.n, 1, 1)
The size of tensors would be incompatible.
Please check the latest commit. I have made many changes..
Thank you