当前位置:网站首页>一、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)
边栏推荐
- mysql插入百万数据(使用函数和存储过程)
- 研究生新生培训第一周:深度学习和pytorch基础
- 【Attention】Visual Attention Network
- 并发编程学习笔记 之 工具类CountDownLatch、CyclicBarrier详解
- 【Transformer】TransMix: Attend to Mix for Vision Transformers
- 性能优化之趣谈线程池:线程开的越多就越好吗?
- C # judge whether the user accesses by mobile phone or computer
- Isaccessible() method: use reflection techniques to improve your performance several times
- 【卷积核设计】Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs
- Detailed explanation of atomic operation class atomicinteger in learning notes of concurrent programming
猜你喜欢
![[clustmaps] visitor statistics](/img/1a/173664a633fd14ea56696dd824acb6.png)
[clustmaps] visitor statistics

【Transformer】TransMix: Attend to Mix for Vision Transformers

第一周任务 深度学习和pytorch基础

并发编程学习笔记 之 工具类Semaphore(信号量)

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

虚假新闻检测论文阅读(四):A novel self-learning semi-supervised deep learning network to detect fake news on...

FFmpeg创作GIF表情包教程来了!赶紧说声多谢乌蝇哥?

电脑视频暂停再继续,声音突然变大

虚假新闻检测论文阅读(二):Semi-Supervised Learning and Graph Neural Networks for Fake News Detection

【Attention】Visual Attention Network
随机推荐
Configuration and use of Nacos external database
PyTorch基础知识(可入门)
虚假新闻检测论文阅读(二):Semi-Supervised Learning and Graph Neural Networks for Fake News Detection
迁移学习——Robust Visual Domain Adaptation with Low-Rank Reconstruction
2021-06-10
Flink connector Oracle CDC synchronizes data to MySQL in real time (oracle19c)
【比赛网站】收集机器学习/深度学习比赛网站(持续更新)
C # judge whether the user accesses by mobile phone or computer
Detailed explanation of atomic operation classes atomicreference and atomicstampedreference in learning notes of concurrent programming
【卷积核设计】Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs
Nifi changed UTC time to CST time
备份谷歌或其他浏览器插件
ASM piling: after learning ASM tree API, you don't have to be afraid of hook anymore
Flutter正在被悄悄放弃?浅析Flutter的未来
【Attention】Visual Attention Network
虚假新闻检测论文阅读(一):Fake News Detection using Semi-Supervised Graph Convolutional Network
[target detection] KL loss: bounding box progression with uncertainty for accurate object detection
【Transformer】SOFT: Softmax-free Transformer with Linear Complexity
【Transformer】TransMix: Attend to Mix for Vision Transformers
[convolution kernel design] scaling up your kernels to 31x31: revising large kernel design in CNN