当前位置:网站首页>raise RuntimeError(‘DataLoader worker (pid(s) {}) exited unexpectedly‘.format(pids_str))RuntimeErro
raise RuntimeError(‘DataLoader worker (pid(s) {}) exited unexpectedly‘.format(pids_str))RuntimeErro
2022-07-28 06:00:00 【Programmer awei】
In use today pytorch The following error occurred while loading data :
raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str))
RuntimeError: DataLoader worker (pid(s) 4252, 17184) exited unexpectedlyA careful analysis of , The reason lies in num_workers
dataloader = DataLoader(dataset,batch_size=2,num_workers=2,shuffle=True)It's a common mistake , Because it is not written in
if __name__ == "__main__":resolvent :
1. No multithreading , take num_workers Set to 0
2. Written in if __name__ =="__main__": below , Because calling sub threads , There must be a main thread .
边栏推荐
猜你喜欢
随机推荐
第七章 单行函数
MySQL view, stored procedure and stored function
使用pyhon封装一个定时发送邮件的工具类
How digital library realizes Web3.0 social networking
话题功能实现
Flex elastic box
Spark中的Structured Streaming
At the moment of the epidemic, online and offline travelers are trapped. Can the digital collection be released?
Trino function tag
[uni app] the use of scroll into view in uni app
极客大挑战2019-SQL注入五题PW
MySQL multi table query
Wechat official account - authorized login
文件上传漏洞总结
CVE_2017_11882漏洞复现(Metasploit开启NT远程桌面添加账户)
regular expression
幂等性组件
(php毕业设计)基于php校园网络报修管理系统获取
Books - Templeton teaches you reverse
第九章 子查询(重点)








