JXingZhao / EGNet

EGNet:Edge Guidance Network for Salient Object Detection (ICCV 2019)
311 stars 62 forks source link

模型训练时,代码中为什么设置的self.net_bone.eval(),而不是self.net_bone.train() #17

Open zhuguanglueying opened 4 years ago

zhuguanglueying commented 4 years ago

作者您好,有一个问题我弄不明白。就是在solver.py文件中,在build_model()成员方法中为什么将模型的方式设置为self.net_bone.eval(),在其后训练时,好像没有让其变为train(),一般不应该是train()吗,希望抽一点时间回复,谢谢作者。

JXingZhao commented 4 years ago

是这样的,因为在saliency 任务中,bn层不是特别关键,而且我们使用的batchsize也是1,所以就直接把bn层的参数在训练和测试的时候全部freeze了

发件人:daishengxuan notifications@github.com 发送日期:2019-10-22 13:59:39 收件人:JXingZhao/EGNet EGNet@noreply.github.com 抄送人:Subscribed subscribed@noreply.github.com 主题:[JXingZhao/EGNet] 模型训练时,代码中为什么设置的self.net_bone.eval(),而不是self.net_bone.train() (#17) 作者您好,有一个问题我弄不明白。就是在solver.py文件中,在build_model()成员方法中为什么将模型的方式设置为self.net_bone.eval(),在其后训练时,好像没有让其变为train(),一般不应该是train()吗,希望抽一点时间回复,谢谢作者。 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

zhuguanglueying commented 4 years ago

好的,谢谢作者,这样说,在这里用train()和eval()对结果没什么影响。再次感谢。