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

A question above negative loss calculation #2

Open
sunshineatnoon opened this issue Dec 28, 2018 · 1 comment
Open

A question above negative loss calculation #2

sunshineatnoon opened this issue Dec 28, 2018 · 1 comment

Comments

@sunshineatnoon
Copy link

sunshineatnoon commented Dec 28, 2018

Hi, Thanks for this awesome work, I'm trying to train it on my own dataset, so I am exploring how to organize my data. I notice that for unmatched images, you calculate their matching loss by rolling a batch of images(https://github.com/ignacio-rocco/ncnet/blob/master/train.py#L137):

    batch['source_image']=batch['source_image'][np.roll(np.arange(b),-1),:] # roll

I don't quite get why moving each sample one position forward creates unmatched pairs, how do you organize your data? Also, is the set information in the csv files useful during training? Thanks!

@GrumpyZhou
Copy link
Contributor

I also have this question. I didn't see how rolling by one position forward guarantee the images are from different sets which is how negative is defined. By visualizing the sets numbers inside a batch, if seems true that mosts pairs will go to different sets if you roll the order by 1 forward. But still if the several consecutive pairs have the same set number. Do you simply ignored this case?

I am looking forward to hearing from your reply!!! Thanks!

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

2 participants