HobbitLong / SupContrast

PyTorch implementation of "Supervised Contrastive Learning" (and SimCLR incidentally)
BSD 2-Clause "Simplified" License
3.12k stars 537 forks source link

Another bug? #109

Open W2Q3Q1 opened 2 years ago

W2Q3Q1 commented 2 years ago

Shall line 126 in main_linear.py

model.load_state_dict(state_dict)

in the same block with return?

For no matter whether cuda is available, we always wants the model to be initiated with ckpt["model"]