当前位置:网站首页>一、multiprocessing.pool.RemoteTraceback
一、multiprocessing.pool.RemoteTraceback
2022-07-29 05:22:00 【MY头发乱了】
遇到如下问题多半时数据有问题`。
// A code block
var foo = 'bar';
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/unaguo/anaconda3/envs/pt1.3-py3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/unaguo/anaconda3/envs/pt1.3-py3.6/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 429, in _worker_fn
batch = batchify_fn([_worker_dataset[i] for i in samples])
File "/home/unaguo/anaconda3/envs/pt1.3-py3.6/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 429, in <listcomp>
batch = batchify_fn([_worker_dataset[i] for i in samples])
File "/data2/enducation/paper_recog_total/train-paper-recog/line_detect/data/paper_dataset.py", line 375, in __getitem__
data_dict = self._transforms(data_dict)
File "/data2/enducation/paper_recog_total/train-paper-recog/line_detect/data/transforms_paper.py", line 13, in __call__
args = trans(args)
File "/data2/enducation/paper_recog_total/train-paper-recog/line_detect/data/transforms_paper.py", line 468, in __call__
dst_points = np.array([[rdw(), rdh()], [w-1-rdw(), rdh()], [w-1-rdw(), h-1-rdh()], [rdw(), h-1-rdh()]])
File "/data2/enducation/paper_recog_total/train-paper-recog/line_detect/data/transforms_paper.py", line 466, in <lambda>
rdh = lambda: np.random.randint(0, self.max_affine_xy_ratio * h)
File "mtrand.pyx", line 746, in numpy.random.mtrand.RandomState.randint
File "_bounded_integers.pyx", line 1254, in numpy.random._bounded_integers._rand_int64
ValueError: low >= high
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data2/enducation/paper_recog_total/train-paper-recog/line_detect/scripts/train_gluon_testpaper.py", line 233, in <module>
for batch_cnt, data_batch in enumerate(tqdm.tqdm(train_loader)):
File "/home/unaguo/anaconda3/envs/pt1.3-py3.6/lib/python3.6/site-packages/tqdm/std.py", line 1178, in __iter__
for obj in iterable:
File "/home/unaguo/anaconda3/envs/pt1.3-py3.6/lib/python3.6/site-packages/mxnet/gluon/data/dataloader.py", line 484, in __next__
batch = pickle.loads(ret.get(self._timeout))
File "/home/unaguo/anaconda3/envs/pt1.3-py3.6/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
ValueError: low >= high
解决思路:
将mx.gluon.data.DataLoader中修改thread_pool=True,什么意思呢?
If True, use threading pool instead of multiprocessing pool. Using threadpool can avoid shared memory usage. If DataLoader is more IO bounded or GIL is not a killing problem, threadpool version may achieve better performance than multiprocessing.
翻译:如果True,则使用线程池而不是多处理池。使用线程池可以避免共享内存的使用。如果“DataLoader”的IO范围更大,或者GIL不是致命的问题是,线程池版本可能实现比多处理更好的性能。
train_loader = mx.gluon.data.DataLoader(train_dataset, batch_size=config.TRAIN.batch_size,
shuffle=True, num_workers=2, thread_pool=True,
last_batch="discard", batchify_fn=batch_fn)
边栏推荐
- ROS常用指令
- Operation commands in anaconda, such as removing old environment, adding new environment, viewing environment, installing library, cleaning cache, etc
- Error in installing pyspider under Windows: Please specify --curl dir=/path/to/build/libcurl solution
- 【语义分割】SETR_Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformer
- 【Attention】Visual Attention Network
- Exploration of flutter drawing skills: draw arrows together (skill development)
- GAN:生成对抗网络 Generative Adversarial Networks
- clion+opencv+aruco+cmake配置
- Isaccessible() method: use reflection techniques to improve your performance several times
- Flink connector Oracle CDC synchronizes data to MySQL in real time (oracle19c)
猜你喜欢
![[semantic segmentation] full attention network for semantic segmentation](/img/5b/e5143701d60bc16a1ec620b03edbb3.png)
[semantic segmentation] full attention network for semantic segmentation

【DL】关于tensor(张量)的介绍和理解

神经网络相关知识回顾(PyTorch篇)

【Transformer】SOFT: Softmax-free Transformer with Linear Complexity

【语义分割】语义分割综述

ABSA1: Attentional Encoder Network for Targeted Sentiment Classification

迁移学习——Transfer Joint Matching for Unsupervised Domain Adaptation

Error in installing pyspider under Windows: Please specify --curl dir=/path/to/build/libcurl solution

在uni-app项目中,如何实现微信小程序openid的获取

研究生新生培训第三周:ResNet+ResNeXt
随机推荐
[tensorrt] convert pytorch into deployable tensorrt
How to obtain openid of wechat applet in uni app project
一、Focal Loss理论及代码实现
【卷积核设计】Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs
虚假新闻检测论文阅读(四):A novel self-learning semi-supervised deep learning network to detect fake news on...
并发编程学习笔记 之 工具类Semaphore(信号量)
Detailed explanation of atomic operation class atomicinteger in learning notes of concurrent programming
Show profiles of MySQL is used.
anaconda中移除旧环境、增加新环境、查看环境、安装库、清理缓存等操作命令
【Transformer】ACMix:On the Integration of Self-Attention and Convolution
迁移学习—— Transfer Feature Learning with Joint Distribution Adaptation
二、深度学习数据增强方法汇总
These process knowledge you must know
[pycharm] pycharm remote connection server
Yum local source production
[DL] build convolutional neural network for regression prediction (detailed tutorial of data + code)
yum本地源制作
简单聊聊 PendingIntent 与 Intent 的区别
【Attention】Visual Attention Network
ROS教程(Xavier)