Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two questions about the function G #8

Closed
liujianzhao6328057 opened this issue Sep 12, 2020 · 3 comments
Closed

two questions about the function G #8

liujianzhao6328057 opened this issue Sep 12, 2020 · 3 comments

Comments

@liujianzhao6328057
Copy link

liujianzhao6328057 commented Sep 12, 2020

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.
@yenchanghsu
Copy link
Collaborator

  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.

@linhlt-it-ee
Copy link

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.

@yenchanghsu
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants