-
Notifications
You must be signed in to change notification settings - Fork 284
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
Can someone explain this line? #21
Comments
When the information reaches the classification head, it has one vector of dimension As the transformer network is auto-regressive, the value you select has to be the rightmost one which corresponds to
|
@rodgzilla Thank you a lot for the explanation. It makes a lot of sense! Out of curiosity, why all the values cannot be used? |
Well for a classifier, we usually want a fixed length representation of the sentence so we can't really use a varying number of values. Starting from that, the last hidden state is the most logical summary of the sentence. But there are other possible options of course, feel free to try your ideas! |
in original open ai code (https://github.com/openai/finetune-transformer-lm/blob/bd1cf7d678926041e6d19193cab7e5cd8ce2fce6/train.py#L191) in |
If my understanding is correct this is finding the places where there is delimiter and filters for them. How does this help with training?
pytorch-openai-transformer-lm/model_pytorch.py
Line 207 in 253ca42
The text was updated successfully, but these errors were encountered: