-
Notifications
You must be signed in to change notification settings - Fork 335
Better variable naming in Darknet models. #1297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks Sebastian! @quantumalaviya for more comments. feel free to raise a PR addressing this |
Sure, we can do this. Thanks!
When you say "transferring weights" here, does it mean |
@quantumalaviya Thanks!
Not really. Recently I played around with some Yolo implementations in Tensorflow and wanted to reuse existing darknet weights from this repo, but I gave up after noticing that it's a flat list of mostly integer names (with batchnorms appearing mostly before convs). I was thinking that if we have this option to add names to layers / variables it is much more readable and allows such weights reuse. |
Ah, got it. |
Currently when we inspect Darknet variables:
we will get very unclear information about the variables:
essentially a flat list of convs + BN. This makes inspecting variables or transfering weights very difficult if not impossible.
The problem:
This will propagate on all Darknet based futere implementations: YoloV7 YoloV8, YoloX etc.
The fix:
In Darknet Conv Block the
name
variable is unused. One could change:from
to
After fix, the weights seem to be loading without issue on my machine and the variables have beautiful meaningful names:
The text was updated successfully, but these errors were encountered: