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

decoupled head 问题 #38

Closed
Dannyxu1031 opened this issue Jun 8, 2022 · 6 comments
Closed

decoupled head 问题 #38

Dannyxu1031 opened this issue Jun 8, 2022 · 6 comments
Labels
bug Something isn't working Stale

Comments

@Dannyxu1031
Copy link

Dannyxu1031 commented Jun 8, 2022

我把您的Decoupled Head 移植到到了我的代码里。修改了common.py 和yolo.py.我运行yolo.py测试网络是否可以正常forward,但出现了以下问题:

28 [19, 23, 27] 1 7337351 Decoupled_Detect [10, [[18, 14, 12, 26, 23, 20], [33, 24, 19, 44, 45, 34], [66, 49, 104, 73, 168, 136]], [216, 216, 416]]

<class 'NoneType'> None

Traceback (most recent call last):
File "/workspace/xdy/yolov5/models/yolo.py", line 689, in
model = Model(opt.cfg,opt.feature).to(device)
File "/workspace/xdy/yolov5/models/yolo.py", line 332, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
File "/workspace/xdy/yolov5/models/yolo.py", line 355, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/workspace/xdy/yolov5/models/yolo.py", line 378, in _forward_once
x = m(x) # run
File "/root/miniconda3/envs/torch17/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/workspace/xdy/yolov5/models/yolo.py", line 57, in forward
bs, _, ny, nx = x[i].shape # x(bs,255,20,20) to x(bs,3,20,20,85)
AttributeError: 'NoneType' object has no attribute 'shape'

class Decoupled_Detect中的forward 的 x[i]是个空值 用原来的detect倒是正常,求作者大大指教

@Dannyxu1031 Dannyxu1031 added the bug Something isn't working label Jun 8, 2022
@positive666
Copy link
Owner

简单说下 这个YOLO是要改一下的 你仔细看下 因为你运行的时候程序会模拟一次参数初始化和模型加载 应该是某步逻辑导致的 你看下我现在的代码 我最晚下周更一次 在别的项目上很忙

@Dannyxu1031
Copy link
Author

您好!上一个问题我已经解决了,我想问下看到你的yolov5s+decoupled的FLOPs是17.2 但是我运行出来是57.4FLOPs。请问您是修改了解耦头的卷积核数量吗

简单说下 这个YOLO是要改一下的 你仔细看下 因为你运行的时候程序会模拟一次参数初始化和模型加载 应该是某步逻辑导致的 你看下我现在的代码 我最晚下周更一次 在别的项目上很忙

@whut-dg
Copy link

whut-dg commented Jun 13, 2022

我的FLOPs达到了56.9,所以很好奇是为什么和您给的数据差这么多

@QMLmulan
Copy link

您好!上一个问题我已经解决了,我想问下看到你的yolov5s+decoupled的FLOPs是17.2 但是我运行出来是57.4FLOPs。请问您是修改了解耦头的卷积核数量吗

简单说下 这个YOLO是要改一下的 你仔细看下 因为你运行的时候程序会模拟一次参数初始化和模型加载 应该是某步逻辑导致的 你看下我现在的代码 我最晚下周更一次 在别的项目上很忙

我也遇到了这样的问题,请问您是怎么解决的?

@WangQvQ
Copy link

WangQvQ commented Jun 22, 2022

您好!上一个问题我已经解决了,我想问下看到你的yolov5s+decoupled的FLOPs是17.2 但是我运行出来是57.4FLOPs。请问您是修改了解耦头的卷积核数量吗

简单说下 这个YOLO是要改一下的 你仔细看下 因为你运行的时候程序会模拟一次参数初始化和模型加载 应该是某步逻辑导致的 你看下我现在的代码 我最晚下周更一次 在别的项目上很忙

我也遇到了同样的问题,请问您找到原因了吗

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

5 participants