sthalles / SimCLR

PyTorch implementation of SimCLR: A Simple Framework for Contrastive Learning of Visual Representations
https://sthalles.github.io/simple-self-supervised-learning/
MIT License
2.21k stars 458 forks source link

Validation Loss calculation #4

Closed alessiamarcolini closed 3 years ago

alessiamarcolini commented 4 years ago

First of all, thank you for your great work!

Method _validate in simclr.py will raise ZeroDivisionError at line 148 if the validation data loader performs only one iteration (since counter starts from 0).

sthalles commented 4 years ago

Hi, thanks for the code!

sthalles commented 3 years ago

Hello guys, that is a general message to say that I have refactored the whole project. I believe the project is much easier to understand now. Please have a look at the new impl and free to submit PR if you find any bugs. Thanks.