iscyy / yoloair

🔥🔥🔥 专注于YOLOv5,YOLOv7、YOLOv8、YOLOv9改进模型,Support to improve backbone, neck, head, loss, IoU, NMS and other modules🚀
https://github.com/iscyy/yoloair
GNU General Public License v3.0
2.51k stars 430 forks source link

deepcopy protocol 错误,请问有什么解决方法吗,谢谢 #106

Closed Wisdom2wisdom closed 2 years ago

Wisdom2wisdom commented 2 years ago

Search before asking

Question

_Traceback (most recent call last): File "E:/executable_code/YOLO/yoloair2022/train.py", line 704, in main(opt) File "E:/executable_code/YOLO/yoloair2022/train.py", line 600, in main train(opt.hyp, opt, device, callbacks) File "E:/executable_code/YOLO/yoloair2022/train.py", line 192, in train ema = ModelEMA(model) if RANK in [-1, 0] else None File "E:\executable_code\YOLO\yoloair2022\utils\torch_utils.py", line 307, in init self.ema = deepcopy(deparallel(model)).eval() # FP32 EMA File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 146, in deepcopy y = copier(x, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 296, in _reconstruct value = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 146, in deepcopy y = copier(x, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 296, in _reconstruct value = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 146, in deepcopy y = copier(x, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 296, in _reconstruct value = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 146, in deepcopy y = copier(x, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 296, in _reconstruct value = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 146, in deepcopy y = copier(x, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 296, in _reconstruct value = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 146, in deepcopy y = copier(x, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\copy.py", line 153, in deepcopy y = copier(memo) File "C:\D_installation_packet\Anaconda\installion_package\envs\yolov6\lib\site-packages\torch\tensor.py", line 55, in deepcopy raise RuntimeError("Only Tensors created explicitly by the user " RuntimeError: Only Tensors created explicitly by the user (graph leaves) support the deepcopy protocol at the moment

Additional

No response

iscyy commented 2 years ago

Consider search engines