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

ValueError: Expected target size (12, 50265), got torch.Size([12, 510]) when calling learn.lr_find() #7

Open
max-rbi opened this issue Feb 19, 2021 · 0 comments

Comments

@max-rbi
Copy link

max-rbi commented Feb 19, 2021

When trying to train the learner, there seems to be an issue where the expected target size is the size of the vocab for roberta

---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

<ipython-input-27-d81c6bd29d71> in <module>()
----> 1 learn.lr_find()

18 frames

/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce, reduction)
   2272         if target.size()[1:] != input.size()[2:]:
   2273             raise ValueError('Expected target size {}, got {}'.format(
-> 2274                 out_size, target.size()))
   2275         input = input.contiguous()
   2276         target = target.contiguous()

ValueError: Expected target size (12, 50265), got torch.Size([12, 510])
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

1 participant