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

请问保存旧样本的列表太大了总是报错有什么办法解决吗,或者说您用的GPU的内存是多少G的呢? #1

Open
Mo-Xi opened this issue Dec 24, 2019 · 7 comments

Comments

@Mo-Xi
Copy link

Mo-Xi commented Dec 24, 2019

请问保存旧样本的列表太大了总是报错有什么办法解决吗,或者说您用的GPU的内存是多少G的呢?

@DRSAD
Copy link
Owner

DRSAD commented Dec 24, 2019

将部分操作移动到cpu上,我用的GPU是10GB左右吧

@Mo-Xi
Copy link
Author

Mo-Xi commented Dec 25, 2019

谢谢你的回复,在阅读您的代码时我发现您在做新旧类别间的损失函数时都是采用了F.binary_cross_entropy_with_logits,这似乎与文中所说的蒸馏损失函数有区别,为什么采用这种损失函数呢?,并且我重新跑您的代码时准确率最后降至36%,请问您是不是有什么改动没有提交呢

@DRSAD
Copy link
Owner

DRSAD commented Dec 25, 2019

_compute_loss函数的if else结构,if表明是第一次训练,else是增量训练,可以阅读else处的代码,就是文中的loss,我映像中iCaRL这个文件的代码的确有过改动,我想请问下,你是否更改过我的代码?

iCaRL的代码我运行过多次,准确率最后的确是50左右

@Mo-Xi
Copy link
Author

Mo-Xi commented Dec 25, 2019

您好,我并未改动过您的代码

代码写的逻辑清晰,很棒,但是我有一个疑惑,您在_compute_loss函数else中,比如进行第二次训练时将后十类样本的标签值的前十位也改成了该样本通过旧网络的输出值,这里似乎是只需要对新类别的样本计算交叉熵损失,对旧类别样本计算蒸馏损失

在代码未改动的情况下确实不能复现出您展现出的准确率

@DRSAD
Copy link
Owner

DRSAD commented Dec 25, 2019

可以看看原文的蒸馏loss,映像中就是这样的

过几天我拖下代码来跑一跑,给您带来困扰了,跑完的结果我会告知您的,目前服务器上没有空闲的卡,可能需要等一段时间

@Mo-Xi
Copy link
Author

Mo-Xi commented Dec 26, 2019

您好,将您的代码main.py中初始learningrate调整为icarl论文中所说的2.0(您的原代码中设置为了0.1)即可复现您的结果了,

还有您在结果中提到的hybird1是不是不用KNN进行分类的结果呢?

@DRSAD
Copy link
Owner

DRSAD commented Dec 26, 2019

哦哦,之前我有尝试过其他loss,学习率忘记改回来了,谢谢提醒,hybird1是用全连接分类的数值,是我在某次更改前的数值,不够准确,以你目前跑出的结果为准吧

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

No branches or pull requests

2 participants