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

(1)进行了函数内容缩进(2)加上了alpha前面忘加的self.(3)loss的求和方式增加了一种batchsize方式 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zxcvbnmkj
Copy link

您的代码真的非常好,简洁易懂,教程详细,非常感谢您的无私分享,但是我运行时注意到代码尚且存在两点小问题【(1)与(2)】所以特此发起了Pull 请求
(1)def forward(self, preds, labels):函数中的内容您忘了缩进了
(2)第45行: alpha = self.alpha.to(preds.device)忘记在alpha前面加上self了,使用cuda时会报错--alpha和label不在一个设备上。
(3)原先的loss返回方式只有sum和mean两种,我新增加了一种batch_size方式。

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.

1 participant