YOLOv5-Multibackbone-Compression
YOLOv5-Multibackbone-Compression copied to clipboard
local variable 'stride' referenced before assignment
return flops * img_size[0] / stride * img_size[1] / stride
UnboundLocalError: local variable 'stride' referenced before assignment
在if上添加一行stride=max(int(model.stride.max()), 32) if hasattr(model, 'stride') else 32试试
相同问题