AidenDurrant / SimCLR-Pytorch

An implementation of "A Simple Framework for Contrastive Learning of Visual Representatoins" SimCLR
31 stars 9 forks source link

Evaluation should not be computed with gradient #7

Open ezelikman opened 3 years ago

ezelikman commented 3 years ago

In the original implementation, the evaluation is performed with gradients when finetuning. This can be corrected by wrapping the evaluation in a torch.no_grad()