soumith / imagenet-multiGPU.torch

an imagenet example in torch.
BSD 2-Clause "Simplified" License
402 stars 158 forks source link

std calculation #13

Closed bobbens closed 9 years ago

bobbens commented 9 years ago

I don't think this matters much, but you're calculating the per channel std without the global mean you precalculated. (donkey.lua line 193). This is incorrect, but assuming you wanted to do it like this, you could collapsed the mean and std loop into a single one instead of doing two. The proper way would be to calculate the std using the previously calculated mean. However, I don't think this will change much in practice.

soumith commented 9 years ago

you are right, does not matter much in practice but it's wrong. if you do a PR, will welcome it, but wont fix it myself. I've moved on to a more compact 400 line version that I wrote, which I like a bit more.