Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DetectMultiBackend is not found #3

Open
fei015 opened this issue Oct 25, 2023 · 8 comments
Open

DetectMultiBackend is not found #3

fei015 opened this issue Oct 25, 2023 · 8 comments

Comments

@fei015
Copy link

fei015 commented Oct 25, 2023

When I run train.py, there is a error:
"ImportError: cannot import name 'DetectMultiBackend' from 'models.common'."
In modles/common.py, class DetectMultiBackend is not found.
Looking forward to a reply!

@Fanty01
Copy link

Fanty01 commented Oct 31, 2023

Yeah, I also have the same problem.Looking forward to a reply too!

@ghost
Copy link

ghost commented Nov 1, 2023

Yes, I have the same problem.

@Alexwong-1024
Copy link

raceback (most recent call last):
File "train.py", line 34, in
import val # for end-of-epoch mAP
File "/root/autodl-tmp/EMS-YOLO/val.py", line 26, in I also have the same problem. I wonder if I should add this module. My author said that I use yolov3.
from models.common import DetectMultiBackend
ImportError: cannot import name 'DetectMultiBackend' from 'models.common' (/root/autodl-tmp/EMS-YOLO/models/common.py),

@Alexwong-1024
Copy link

Looking forward to your answer from the author

@sjoks93
Copy link

sjoks93 commented Nov 1, 2023

Same issue here

@666-qiong
Copy link

The common.py file misses a lot of modules

@HeuristicLU
Copy link

我跑通了,上传上来了,分享给你https://github.com/HeuristicLU/EMS-yolo

@sumingming123
Copy link

我跑通了,上传上来了,分享给你https://github.com/HeuristicLU/EMS-yolo

大家有遇到过这个问题吗?我已经同意了time_window设置参数,还是显示这个错误。Starting training for 250 epochs...

Epoch gpu_mem box obj cls labels img_size
0%| | 0/1 [00:00<?, ?it/s] /content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py:343: FutureWarning: torch.cuda.amp.autocast(args...) 已弃用。请改用 torch.amp.autocast('cuda', args...)。
使用 amp.autocast(enabled=cuda):
0%| | 0/1 [00:00 <?,?it / s]
回溯(最近一次调用最后一次):
文件“/content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py”,第 662 行,在
main(opt)中
文件“/content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py”,第 559 行,在主
训练(opt.hyp,opt,device,callbacks)
文件“/content/drive/MyDrive/EMS_YOLO_LU/g1_resnet/train_g1.py”,第 344 行,在训练中
pred = model(imgs)# 转发
文件“/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py”,第 1736 行,在 _wrapped_call_impl 中
返回 self._call_impl(*args,**kwargs)
文件“/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py”,第 1747 行,在 _call_impl 中
返回 forward_call(*args, **kwargs)
文件“/content/drive/MyDrive/EMS_YOLO_LU/models/yolo.py”,第 140 行,在 forward
输入[i] = x
RuntimeError: expand(torch.FloatTensor{[47, 5, 3, 320, 320]}, size=[47, 5, 3, 320]): 提供的尺寸数量 (4) 必须大于或等于张量中的维数 (5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants