training G funstion on imagenet
Hi, I have question regarding training function G. by using pair-enumeration layer there are always many more dis-similar pair per batch than similar pairs, I can see that it works on Omniglot but on more complicated datasets like imagenet, would not this imbalance be a problem? is different hyperparameters used to train G for imagenet?
Hi, the Omniglot has more than nine hundred classes, so the situation is the same. The imbalance is addressed by sampling in the Omniglot dataloader.
Training the G from scratch on ImageNet can be time-consuming. There is a short cut for building the G without training. Here are the steps: (1) Pick an ImageNet-pretrained model. (2) Feed two images separately to get two predicted probability vectors (softmax outputs). (3) The inner product between the two vectors is the probability of being the same class (similar pair). (4) You can thresholding the final probability to get the binarized prediction. You can find more details about this method in Reference Section 6.3.2.
I hope this helps.
The shortcut method seems interesting , I will give it a try, thanks for the hint and for the reference.
Hi, I cannot find the code of training function G, could you please upload a version of source code for reference?
This line is the command to train function G.
Thanks! I didn't notice it