其他分享
首页 > 其他分享> > RuntimeError: An attempt has been made to start a new process before the current pr

RuntimeError: An attempt has been made to start a new process before the current pr

作者:互联网

https://blog.csdn.net/jacke121/article/details/81456842
以上问题的解决方法如下:
原因:多进程需要在main函数中运行,

解决方法1:
if name==‘main’:
加main函数,在main中调用

解决方法2:

num_workers改为0,单进程加载

标签:pr,made,attempt,函数,process,进程,解决,main,方法
来源: https://blog.csdn.net/weixin_52300580/article/details/113104865