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

fix error on meta learn function #1

Closed
wants to merge 1 commit into from

Conversation

skhnha
Copy link

@skhnha skhnha commented Oct 18, 2021

First, thanks for making your code public. It was very helpful.

I just found very minor error in meta_learn function of lightning_mtl.py.

If "labels" of incoming batch is sampled as
[26., 26., 26., 26., 26., 26., 26., 26., 26., 26.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
15., 15., 15., 15., 15., 15., 15., 15., 15., 15.,
37., 37., 37., 37., 37., 37., 37., 37., 37., 37.,
47., 47., 47., 47., 47., 47., 47., 47., 47., 47.]

new label for multi task learning is changed as
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4]

Because after "26" label(1st row) is changed to new "0" label(1st row),
then "0" labels(both of 1st row, 2nd row) are changed to new "1" label.

So to avoid this less likely situation, I made a labels_new tensor.

Thank you.

@skhnha skhnha closed this by deleting the head repository Feb 26, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant