-
Notifications
You must be signed in to change notification settings - Fork 154
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
关于train accuracy #52
Comments
你好,请问这个问题解决了吗 |
解决了
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:07
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
你好,请问这个问题解决了吗
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
请问是什么原因,需要修改代码吗,是否方便分享一下 |
第156行代码有问题,correct一直是0,具体原因我忘了,代码在学校,你可以先排查一下
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:28
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
请问是什么原因,需要修改代码吗,是否方便分享一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
嗯, 非常感谢您的回复,这个我也看到了,
我看网上有这麽说,原因是因为sum中的数值如果是bool类型,那么输出的就只有0和1,所以要将sum中数据类型强行转换,转换成float的类型,不知道是不是这个原因
还有他用total = label.size(0) correct/total 这个total是不是也有问题呢,感觉是个定值,有点不太理解
————————————————
版权声明:本文为CSDN博主「从天而降小可爱」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_36411839/article/details/103497868
…------------------ 原始邮件 ------------------
发件人: "wujiyang/Face_Pytorch" ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上10:35
***@***.***>;
***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
第156行代码有问题,correct一直是0,具体原因我忘了,代码在学校,你可以先排查一下
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:28
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
请问是什么原因,需要修改代码吗,是否方便分享一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
|
num_correct_classified = float((np.array(prediction.cpu()) == np.array(labels.data.cpu())).sum())
你用一下这行代码试试
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:41
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
嗯, 非常感谢您的回复,这个我也看到了,
我看网上有这麽说,原因是因为sum中的数值如果是bool类型,那么输出的就只有0和1,所以要将sum中数据类型强行转换,转换成float的类型,不知道是不是这个原因
还有他用total = label.size(0)   correct/total  这个total是不是也有问题呢,感觉是个定值,有点不太理解
————————————————
版权声明:本文为CSDN博主「从天而降小可爱」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_36411839/article/details/103497868
------------------ 原始邮件 ------------------
发件人: "wujiyang/Face_Pytorch" ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上10:35
***@***.***>;
***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
第156行代码有问题,correct一直是0,具体原因我忘了,代码在学校,你可以先排查一下
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:28
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
请问是什么原因,需要修改代码吗,是否方便分享一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
好的,我用这个替换试试,很晚了,不打扰了,晚安。
…------------------ 原始邮件 ------------------
发件人: "wujiyang/Face_Pytorch" ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上10:48
***@***.***>;
***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
num_correct_classified = float((np.array(prediction.cpu()) == np.array(labels.data.cpu())).sum())
你用一下这行代码试试
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:41
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
嗯, 非常感谢您的回复,这个我也看到了,
我看网上有这麽说,原因是因为sum中的数值如果是bool类型,那么输出的就只有0和1,所以要将sum中数据类型强行转换,转换成float的类型,不知道是不是这个原因
还有他用total = label.size(0)   correct/total  这个total是不是也有问题呢,感觉是个定值,有点不太理解
————————————————
版权声明:本文为CSDN博主「从天而降小可爱」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_36411839/article/details/103497868
------------------ 原始邮件 ------------------
发件人: "wujiyang/Face_Pytorch" ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上10:35
***@***.***>;
***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
第156行代码有问题,correct一直是0,具体原因我忘了,代码在学校,你可以先排查一下
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:28
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
请问是什么原因,需要修改代码吗,是否方便分享一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
|
你好,我想请问一下我跑这个项目没有用预训练模型,用SERes100_IR CASIA-WebFace数据集,默认参数跑出来lfw准确率还不到0.94 ,
不知道你跑的时候有没有用预训练模型,准确率能达到多少呢?
…------------------ 原始邮件 ------------------
发件人: "wujiyang/Face_Pytorch" ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上10:48
***@***.***>;
***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
num_correct_classified = float((np.array(prediction.cpu()) == np.array(labels.data.cpu())).sum())
你用一下这行代码试试
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:41
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
嗯, 非常感谢您的回复,这个我也看到了,
我看网上有这麽说,原因是因为sum中的数值如果是bool类型,那么输出的就只有0和1,所以要将sum中数据类型强行转换,转换成float的类型,不知道是不是这个原因
还有他用total = label.size(0)   correct/total  这个total是不是也有问题呢,感觉是个定值,有点不太理解
————————————————
版权声明:本文为CSDN博主「从天而降小可爱」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_36411839/article/details/103497868
------------------ 原始邮件 ------------------
发件人: "wujiyang/Face_Pytorch" ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上10:35
***@***.***>;
***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
第156行代码有问题,correct一直是0,具体原因我忘了,代码在学校,你可以先排查一下
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年2月17日(周四) 晚上10:28
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [wujiyang/Face_Pytorch] 关于train accuracy (#52)
请问是什么原因,需要修改代码吗,是否方便分享一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
|
你好,train accuracy一直为0要怎么解决呢?我用num_correct_classified = float((np.array(prediction.cpu()) == np.array(labels.data.cpu())).sum())还是为0,是不是刚开始为0,训练到后面才开始提高? |
@SanYi2019 我的也是这种情况,我用num_correct_classified = float((np.array(prediction.cpu()) == np.array(labels.data.cpu())).sum())还是为0,最后怎么解决的呢,能否分享一下代码呢 |
@Teresa907 我用num_correct_classified = float((np.array(prediction.cpu()) == np.array(labels.data.cpu())).sum())还是为0,最后怎么解决的呢,能否分享一下代码呢 |
学长你好,请问为什么我训练时train accuracy一直为0呀?
The text was updated successfully, but these errors were encountered: