Open Dysdjkl opened 1 year ago
I believe the out-dim is just the dimension of the feature representation produced by the projection head.
The reason the authors use out_dim in the models.resnet18(pretrained=False, num_classes=out_dim) is only because in the implementation of resnet18
or resnet50
in torchvision, the num_classes will setup the out put size of the final linear layer (nn.Linear), not because it has anything to do with the number of your categories. I mean, after all, it is "self-supervised" learning :p.
If I use my own data, do I need to change the category of out-dim in the run.py to the number of categories of my own data?