libtorch-yolov5
libtorch-yolov5 copied to clipboard
model.model[-1].export = False 疑问
有一个疑问,在导出模型时model.model[-1].export = False 但是Detect层中还有对每个特征图进行卷积操作的操作,如果导出模型不导出Detect层,模型的输出不就与训练的不一致了么?
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?
It seems that they just wanna skip the operations between lines 47 and 54, and they've run these convolution operations here.
@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
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.