Skip to content

model.model[-1].export = False 疑问 #45

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

Open
rrjia opened this issue Mar 25, 2021 · 4 comments
Open

model.model[-1].export = False 疑问 #45

rrjia opened this issue Mar 25, 2021 · 4 comments

Comments

@rrjia
Copy link

rrjia commented Mar 25, 2021

有一个疑问,在导出模型时model.model[-1].export = False 但是Detect层中还有对每个特征图进行卷积操作的操作,如果导出模型不导出Detect层,模型的输出不就与训练的不一致了么?

@rrjia
Copy link
Author

rrjia commented Mar 25, 2021

detect layer have conv layer
'''
self.m = nn.ModuleList(nn.Conv2d(x, self.no * self.na, 1) for x in ch) # output conv
'''
this Conc2d convert feature map to detect result, but why export model set it to False?

@zhiqwang
Copy link

It seems that they just wanna skip the operations between lines 47 and 54, and they've run these convolution operations here.

@Jelly123456
Copy link

@zhiqwang
so, for yolov5-tagV5.0 when exporting, the following command should be run in order to be able to run with this repo?
python export.py --weights yolov5l.pt --device 0 --inplace --train

@zhiqwang
Copy link

Hi @Jelly123456 , I haven't tested the export.py of ultralytics/yolov5 for a long time, the team of ultralytics update their interfaces very frequently.

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

3 participants