当前位置:网站首页>pytorch训练进程被中断了
pytorch训练进程被中断了
2022-07-05 11:13:00 【IMQYT】
吓死我了,训练3天的模型的进程被自己手欠杀了,差点就哭了,租了一星期的服务器的钱打水漂了吗,时间都白费了吗,还能不能补救啊!第一次遇到这种情况,而且自己的代码运行很慢了(RTXA5000,按理说不慢才对,数据量太大了,为了减少日志的IO浪费的时间,就没有写日志),只保存了模型。已经手在抖了
话不多说,如何补救呢?
代码里保存模型只用了torch.save.其他参数都没有保存。epoch什么的都没保存,找了大量的经验,终于找到补救方法
重新加载模型
path='autodl-tmp/GraphDTA-master/model_GINConvNet_kiba.model'
model.load_state_dict(torch.load(path))
这样的话,模型学习到的内容都回来了,包括loss之类的。
从这里我看到,loss确实继续了294次的训练,预测值也是一样继续294次之后的结果,还好捡回来了,但是遇到一个问题,因为我看到epoch似乎重新从1开始了,这样的话不就还要训练600次?,所以记得修改下epoch的总次数,600-294=306,虽然控制中断写这1,但再训练306次就会结束。大功告成
边栏推荐
- Modulenotfounderror: no module named 'scratch' ultimate solution
- go语言学习笔记-分析第一个程序
- [there may be no default font]warning: imagettfbbox() [function.imagettfbbox]: invalid font filename
- Network security of secondary vocational group 2021 Jiangsu provincial competition 5 sets of topics environment + analysis of all necessary private messages I
- C language current savings account management system
- spark调优(一):从hql转向代码
- SSL证书错误怎么办?浏览器常见SSL证书报错解决办法
- Intelligent metal detector based on openharmony
- Lazy loading scheme of pictures
- Stop saying that microservices can solve all problems!
猜你喜欢
Go language learning notes - first acquaintance with go language
A mining of edu certificate station
Codeforces Round #804 (Div. 2)
Lombok makes ⽤ @data and @builder's pit at the same time. Are you hit?
不要再说微服务可以解决一切问题了!
DDR4的特性与电气参数
Go language learning notes - analyze the first program
购买小间距LED显示屏的三个建议
go语言学习笔记-分析第一个程序
关于vray5.2怎么关闭日志窗口
随机推荐
Variables///
How to close the log window in vray5.2
MFC pet store information management system
What about SSL certificate errors? Solutions to common SSL certificate errors in browsers
不要再说微服务可以解决一切问题了!
2022 chemical automation control instrument examination questions and online simulation examination
Stop saying that microservices can solve all problems!
A mining of edu certificate station
基础篇——基础项目解析
【广告系统】Parameter Server分布式训练
Basic part - basic project analysis
Go language learning notes - analyze the first program
一次edu证书站的挖掘
Golang application topic - channel
Beego cross domain problem solution - successful trial
Summary of websites of app stores / APP markets
About the use of Vray 5.2 (self research notes)
go语言学习笔记-分析第一个程序
Technology sharing | common interface protocol analysis
Characteristics and electrical parameters of DDR4