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

Waht's the meaning of this line? #25

Closed
yunyundong opened this issue Oct 16, 2018 · 3 comments
Closed

Waht's the meaning of this line? #25

yunyundong opened this issue Oct 16, 2018 · 3 comments

Comments

@yunyundong
Copy link

labels = torch.cat([labels,datasets[i][1]])+torch.max(labels)+1

Seemingly, assume that length of datasets[0][1] and dataset[1][1] is n1, and n2 respectively and (n1<n2). So, datasets[0][1][:n1]==datasets[1][1][:n1], but they are not the positive pairs.
Is it right? the original line is a bug ? @ducha-aiki @DagnyT @spongezhang

@DagnyT
Copy link
Owner

DagnyT commented Oct 16, 2018

labels = torch.cat([labels, datasets[i][1]+torch.max(labels)+1]

It is written in such way to shift label indices, in every dataset you expect to have labels: [0, n1], so in concat function labels from new dataset have to start from (n1+1).

@yunyundong
Copy link
Author

How can I point to the newest version? what's the address? Thank you very much.

@DagnyT
Copy link
Owner

DagnyT commented Oct 16, 2018

Thank you, yes, it was a bug in TotalDataLoader. Please, check the update.

@DagnyT DagnyT closed this as completed Oct 16, 2018
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