ayooshkathuria / YOLO_v3_tutorial_from_scratch

Accompanying code for Paperspace tutorial series "How to Implement YOLO v3 Object Detector from Scratch"
https://blog.paperspace.com/how-to-implement-a-yolo-object-detector-in-pytorch/
2.32k stars 724 forks source link

Hard coded stride in create_modules for upsample #36

Open geoffwoollard opened 5 years ago

geoffwoollard commented 5 years ago

There is an error in darknet.py line 118 in https://github.com/ayooshkathuria/YOLO_v3_tutorial_from_scratch/commit/0057114edfa1522e089dc5f379a1ebd4282f0ff3

upsample = nn.Upsample(scale_factor = 2, mode = "nearest") should be upsample = nn.Upsample(scale_factor = stride, mode = "nearest")

This bug is silent since stride=2 in the cfg file. But if someone changed the value it would not be applied. The value 2 would be used since it is hard coded in create_modules.