会中断模型训练单元格,并重新安装新的回调,重新定位模型权重吗?
我正在Google Colab Pro上训练CNN,不幸的是,考虑到添加ModelCheckpoint回调为时已晚。尽管正在使用Google Pro,但该模型非常简单的模型已经训练了10个小时。
如果我中断型号。拟合单元格(我停止运行),然后将ModelCheckPoint回调添加到模型中的回调中。拟合函数,模型是否会从头开始重新训练?
I'm training a CNN on google colab pro, and unfortunately thought about adding the ModelCheckpoint callback too late. Despite being on google pro, the model very simple model has been training for 10 hours now.
If I interrupt the model.fit cell (I stop it running), and add the ModelCheckpoint callback to the callbacks in the model.fit function, will the model re-train from scratch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短答案:否
一个更长的答案:您实际上可以尝试以下操作:采用模型并查看初始损失,例如
i.sstatic.net/gz1q3.png“ rel =“ nofollow noreferrer 您可以看到,在第一个时期结束时,训练损失为0.2499。现在,我修改了fit方法中的参数,并添加回调。
,在第一个时代开始时,我们进行了培训,从损失较低开始。
为了重新启动培训,您必须重新编译模型。
Brief answer: No.
A longer answer: You can actually try the following: take your model and look at the initial loss for example
As you can see, at the end of the first epoch the training loss is 0.2499. Now I modify the parameters in the fit method adding a callback.
And at the beginning of the first epoch, we have the training starting with lower loss.
In order to restart the training you have to recompile the model.