20210317-训练中的问题

遇到的三个问题

(1)下载的pytorch是cpu版本的
解决:配置pytorch源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

conda install pytorch torchvision cudatoolkit=10.1
(2) 训练到(700/1000)停止,pycharm连接不上服务器的解释器:Couldn’t refresh skeletons for remote interpreter
解决:

删掉pycharm安装文件夹下的skeletons文件夹,

没解决问题的话重新改远程连接的配置,有两个地方
(1)tools -> Deployment -> Configuration connection配置
(2)File -> Setting Project Interpreter

(3) 训练(24/100)停止:RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread Aborted (core dumped)

在这里插入图片描述

解决:

https://blog.csdn.net/Weyoung_/article/details/109747675

最简单的解决方案是dataloader的num_worker参数设为0,但是加载数据会慢很多

解决方法:utils中,导入matplotlib包的部分进行修改

import matplotlib
#import matplotlib.pyplot as plt
matplotlib.use('Agg') #
from matplotlib import pyplot as plt #
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值