lucidrains / byol-pytorch

Usable Implementation of "Bootstrap Your Own Latent" self-supervised learning, from Deepmind, in Pytorch
MIT License
1.76k stars 248 forks source link

Feat: Add image dataset normalization #4

Closed YoniSchirris closed 4 years ago

YoniSchirris commented 4 years ago

Appendix B, page 13, bottom:

In both training and evaluation, we normalize color channelsby subtracting the average color and dividing by the standar deviation, computed on ImageNet, after applying the augmentations

lucidrains commented 4 years ago

Ok, done! https://github.com/lucidrains/byol-pytorch/commit/ac84dff714b0b28f1ad6450f1e163e557cd7adda

YoniSchirris commented 4 years ago

Hi @lucidrains , could you make the normalization parameters a class parameter? I'll be using it on a different dataset. Would be nice to be able to just pip-install instead of forking and adjusting