YOLOv5-Multibackbone-Compression icon indicating copy to clipboard operation
YOLOv5-Multibackbone-Compression copied to clipboard

local variable 'stride' referenced before assignment

Open Ri-Bai opened this issue 3 years ago • 2 comments

return flops * img_size[0] / stride * img_size[1] / stride

UnboundLocalError: local variable 'stride' referenced before assignment

Ri-Bai avatar Jun 17 '22 07:06 Ri-Bai

在if上添加一行stride=max(int(model.stride.max()), 32) if hasattr(model, 'stride') else 32试试

zhoujialos avatar Jul 26 '22 02:07 zhoujialos

相同问题

kawa11 avatar Sep 29 '22 10:09 kawa11