python 多进程multiprocessing 队列queue报错:AttributeError: Can't pickle local object
生活随笔
收集整理的這篇文章主要介紹了
python 多进程multiprocessing 队列queue报错:AttributeError: Can't pickle local object
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
今天,test-191204-單個(gè)攝像頭調(diào)用multiprocessing線程隊(duì)列queue識(shí)別時(shí),報(bào)錯(cuò):
D:\20191031_tensorflow_yolov3\python\python.exe D:/20191031_tensorflow_yolov3/tensorflow-yolov3/test-191204-單個(gè)攝像頭調(diào)用multiprocessing線程隊(duì)列queue識(shí)別.py 2019-12-05 14:40:38.472262: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2019-12-05 14:40:39.549686: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties: name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.6575 pciBusID: 0000:0e:00.0 totalMemory: 11.00GiB freeMemory: 9.10GiB 2019-12-05 14:40:39.731129: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 1 with properties: name: GeForce GT 710 major: 3 minor: 5 memoryClockRate(GHz): 0.954 pciBusID: 0000:05:00.0 totalMemory: 2.00GiB freeMemory: 1.67GiB 2019-12-05 14:40:39.731780: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1461] Ignoring visible gpu device (device: 1, name: GeForce GT 710, pci bus id: 0000:05:00.0, compute capability: 3.5) with Cuda compute capability 3.5. The minimum required Cuda capability is 3.7. 2019-12-05 14:40:39.732402: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0 2019-12-05 14:40:41.527990: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-12-05 14:40:41.528315: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 0 1 2019-12-05 14:40:41.528511: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0: N N 2019-12-05 14:40:41.528706: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 1: N N 2019-12-05 14:40:41.529236: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8789 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:0e:00.0, compute capability: 6.1) Traceback (most recent call last):File "D:/20191031_tensorflow_yolov3/tensorflow-yolov3/test-191204-單個(gè)攝像頭調(diào)用multiprocessing線程隊(duì)列queue識(shí)別.py", line 223, in <module>YoloTest().dontla_evaluate_detect()File "D:/20191031_tensorflow_yolov3/tensorflow-yolov3/test-191204-單個(gè)攝像頭調(diào)用multiprocessing線程隊(duì)列queue識(shí)別.py", line 201, in dontla_evaluate_detectprocess.start()File "D:\20191031_tensorflow_yolov3\python\lib\multiprocessing\process.py", line 105, in startself._popen = self._Popen(self)File "D:\20191031_tensorflow_yolov3\python\lib\multiprocessing\context.py", line 223, in _Popenreturn _default_context.get_context().Process._Popen(process_obj)File "D:\20191031_tensorflow_yolov3\python\lib\multiprocessing\context.py", line 322, in _Popenreturn Popen(process_obj)File "D:\20191031_tensorflow_yolov3\python\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__reduction.dump(process_obj, to_child)File "D:\20191031_tensorflow_yolov3\python\lib\multiprocessing\reduction.py", line 60, in dumpForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'YoloTest.dontla_evaluate_detect.<locals>.predict_result'Process finished with exit code 1
報(bào)錯(cuò)代碼:
參考解決辦法:AttributeError: Can’t pickle local object 解決辦法
反正我是沒解決。。。
總結(jié)
以上是生活随笔為你收集整理的python 多进程multiprocessing 队列queue报错:AttributeError: Can't pickle local object的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python 多进程 multiproc
- 下一篇: python 多进程multiproce