先参考该博主解决方案,方案链接:https://blog.csdn.net/jacke121/article/details/104328958?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171945485616800213066154%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=171945485616800213066154&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-3-104328958-null-null.nonecase&utm_term=exit%20code&spm=1018.2226.3001.4450#/ 如果还未解决: 则问题是torch的版本不兼容,多次尝试切换不同版本的torch即可。我的torch2.0.0换成2.0.1再换成2.3.0就好了 下面警告是正常: