Modify YOLOv3 backbone from DarkNet to AdderNet

username: promach
cooked: <p>How to correctly modify <a href="https://github.com/eriklindernoren/PyTorch-YOLOv3" rel="nofollow noopener">https://github.com/eriklindernoren/PyTorch-YOLOv3</a> to use <a href="https://github.com/huawei-noah/AdderNet" rel="nofollow noopener">https://github.com/huawei-noah/AdderNet</a> ?</p>
<p>The following colab is what I have so far with the helps of others:<br>
<a href="https://colab.research.google.com/drive/1VCafwykgNKAO6144LssBFFy0TmruDNSE#scrollTo=W3e-WcVxnKfs" class="onebox" target="_blank" rel="nofollow noopener">https://colab.research.google.com/drive/1VCafwykgNKAO6144LssBFFy0TmruDNSE#scrollTo=W3e-WcVxnKfs</a></p>
<p>How to solve <a href="https://gist.github.com/promach/8ddd9794f242c24ffdaa612bcb0bfa33#file-models-py-L321" rel="nofollow noopener">the error on this models.py file</a> ?</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://i.imgur.com/OF1fdcc.png" title="" rel="nofollow noopener"><img src="https://i.imgur.com/OF1fdcc.png" alt width="690" height="90"><div class="meta">
<svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use xlink:href="#far-image"></use></svg><span class="filename"></span><span class="informations">1875×247</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use xlink:href="#discourse-expand"></use></svg>
</div></a></div></p>

username: promach
cooked: <p>I have solved the epoch 0 issue by using the advice given at <a href="https://github.com/huawei-noah/AdderNet/issues/16#issuecomment-612288299" rel="noopener nofollow ugc">huawei-noah/AdderNet#16 (comment)</a></p>
<p>See the <a href="https://gist.github.com/promach/8ddd9794f242c24ffdaa612bcb0bfa33#file-yolov3_-_addernet-ipynb" rel="noopener nofollow ugc">latest ipynb file</a></p>
<p>However, I am still stuck at how the image dataloader works.</p>
<p>Note : I have already ran <a href="https://github.com/pjreddie/darknet/blob/master/scripts/voc_label.py#L57-L58" rel="noopener nofollow ugc">voc_label.py</a></p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/8/78eb09a42ee3d87a35eb6b3beda4db8ab4e4f178.png" data-download-href="https://discuss.pytorch.org/uploads/default/78eb09a42ee3d87a35eb6b3beda4db8ab4e4f178" title="yolov3_dataloader_error"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78eb09a42ee3d87a35eb6b3beda4db8ab4e4f178_2_690x388.png" alt="yolov3_dataloader_error" data-base62-sha1="hfGRsLhMSNbFL45onlBCL78DAnK" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78eb09a42ee3d87a35eb6b3beda4db8ab4e4f178_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78eb09a42ee3d87a35eb6b3beda4db8ab4e4f178_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/7/8/78eb09a42ee3d87a35eb6b3beda4db8ab4e4f178_2_1380x776.png 2x" data-dominant-color="E4E4E4"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">yolov3_dataloader_error</span><span class="informations">1920×1080 590 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>