-
Notifications
You must be signed in to change notification settings - Fork 423
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
Question for models/trainer.py#L325 ? #114
Comments
Hi I have the same problem, what's your conclusion? |
Hi,I have a bug about this statement: |
Ok,i have already solved the problem.It is about using BCEcross before,you should give a sigmoid layer before the output. |
In https://github.com/nlpyang/BertSum/blob/master/src/models/trainer.py#L325 ,
After sum(), the loss.numel() must be 1 , What different between
(loss/loss.numel()).backward()
withloss.backward()
?So, I guess, the loss.numel() may express the
n_docs
?Can we use
loss / normalization
replace(loss/loss.numel())
?The text was updated successfully, but these errors were encountered: