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
Script to use classifier to predict against test #641
Conversation
Hi Nick, thanks! This is great! I'm just on the way back from a conference. Will test the code once I'm back. |
Good idea! |
@Varal7 this is true. There's a whole set of questions on the forum about "what are these numbers which come back as classifier scores" and "why don't they add up to 1" etc. The answer is always softmax, and my thought was to include it to avoid all that confusion. |
I think this code doesn't pad any "padding index" so the result will be different from which is computed by constructing DataLoader. For my own test:
@nlothian @sebastianruder @jph00 Any idea? |
You could be right. I remember looking at the padding issues some, but when I was testing it I don't think I found any difference. There's no difference in behavior here between the scripts and the notebook is there? I don't have the code to retest that, and if you are seeing a difference then it is likely you are correct. I'm sure a patch would be welcomed! |
The problem is I can not determine how many 1s should i pad, and different 1s will give different results. It's confusing. |
Yeah, this is quite weird. I didn't look into this before as I thought we were already ignoring padding using |
I created a PR to fix this issue. |
Just bumping this because I think it's pretty important. @ranihorev's proposed changes broke a lot of the language model, so there should be a better way. @sebastianruder suggestion of the short term fix of using difference to the average document length in the training data is difficult too, because that isn't actually recorded anywhere at the moment. I follow the What is the approach in FastAI 1.0 here? Is it fixed somehow? |
As discussed with @sebastianruder at http://forums.fast.ai/t/cant-replicate-ulmfit-validation-predictions/18477/22?u=nickl