HobbitLong / SupContrast

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

Help Needed #25

Open user432 opened 4 years ago

user432 commented 4 years ago

Hey, Can Supervised Contrastive Loss be implemented for Semantic Segmentation where the output of the model is of the shape; features = [bsz, feat_dim, h, w] target = [bsz, h, w] target_embedding = [bsz, embed_dim, h, w] It would be very helpful if you can help me. Thanks:)

HobbitLong commented 4 years ago

At least you need to modify the input-output format