pytorch错误:RuntimeError: received 0 items of ancdata解决

https://www.cnblogs.com/zhengbiqing/p/10478311.html

https://blog.csdn.net/chen1234520nnn/article/details/103935825

 

https://github.com/pytorch/pytorch/issues/973

1)修改多线程的tensor方式为file_system(默认方式为file_descriptor,受限于open files数量):

#训练python脚本中import torch后,加上下面这句。 
torch.multiprocessing.set_sharing_strategy('file_system')

  

posted @ 2022-04-25 03:19  caoeryingzi  阅读(230)  评论(0编辑  收藏  举报