data_queue, e:6, bn:0, loss:2.02e-03: Tcl_AsyncDelete: async handler deleted by the wrong thread
| 3009/146149 [00:25<16:45, 142.33it/s]
训练个几轮后就会突然提示这个并自动退出
python 3.8 3.10 都一样出现这个问题
查得网上的方法,先测试一下试试:
predict.py里的:
import matplotlib.pyplot as plt
改为:
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
common.py里也先这样改:
import re
import target
import mplfinance as mpf
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import matplotlib as mpl# 用于设置曲线参数
import matplotlib.pyplot as plt
import torch.nn.functional as F
from cycler import cycler# 用于定制线条颜色
from prefetch_generator import BackgroundGenerator
from init import *
from datetime import datetime, timedelta
from torchvision.models import resnet101
data_queue, e:6, bn:0, loss:2.02e-03: Tcl_AsyncDelete: async handler deleted by the wrong thread | 3009/146149 [00:25<16:45, 142.33it/s]
训练个几轮后就会突然提示这个并自动退出
python 3.8 3.10 都一样出现这个问题
查得网上的方法,先测试一下试试:
predict.py里的:
import matplotlib.pyplot as plt 改为: import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt
common.py里也先这样改:
import re import target import mplfinance as mpf import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import matplotlib as mpl# 用于设置曲线参数
import matplotlib.pyplot as plt
import torch.nn.functional as F from cycler import cycler# 用于定制线条颜色 from prefetch_generator import BackgroundGenerator from init import * from datetime import datetime, timedelta from torchvision.models import resnet101
先测试一下看看。