L2C icon indicating copy to clipboard operation
L2C copied to clipboard

two questions about the function G

Open liujianzhao6328057 opened this issue 4 years ago • 1 comments

Hi, i have two questions about the function G:

  1. What is the accuracy (the ability to predict the similarity between two images) of the function G ?
  2. The "sampling in the Omniglot dataloader" makes sure that each cluster samples equal number of images. However, assuming that there are 5 classes per batch and each classes has 10 images, there are 2500 pairs in total (500 similar pairs and 2000 dissimilar pairs). We can see that the imbalanced problem still exists.

liujianzhao6328057 avatar Sep 12 '20 12:09 liujianzhao6328057

  1. The precision and recall of G are printed to console if you run this script. The performance of G learned with Omniglot-bg and tested with Omniglot-eval or MNIST are available in Appendix Table 7 and 13 of the paper.
  2. The sampler does not aim to solve the imbalance problem completely. The sampler only makes the imbalance problem less severe to make sure the number of similar pairs in a mini-batch is not zero. If the imbalance is a concern in your case, a simple option is to calibrate the threshold of binarization after the G is learned.

yenchanghsu avatar Sep 14 '20 05:09 yenchanghsu

Can you please tell me how you converted [sij=0]P(Yi|xi,theta)PYj|xj,theta) to (1-sij)log(1-f(xi,theta)Tf(fxj,theta)) It seems like P(Yi|xi,theta)PYj|xj,theta) ->1-f(xi,theta)Tf(fxj,theta) for no reason. It conflicts with the theory when 2 classes are differents. Your loss function has a positive class =1 when 2 samples have the same predictions. It means the higher overlap, the loss should be lower. In your case, the lower of overlap, the loss is lower.

linhlt-it-ee avatar Aug 08 '23 07:08 linhlt-it-ee

Hi linhlt-it-ee, your question was answered in another thread.

yenchanghsu avatar Aug 08 '23 08:08 yenchanghsu