ceccocats / tkDNN

Deep neural network library and toolkit to do high performace inference on NVIDIA jetson platforms
GNU General Public License v2.0
719 stars 209 forks source link

Broken darknet export #262

Open alexkokh opened 3 years ago

alexkokh commented 3 years ago

There's couple issues with exporting weights from darknet:

My solution was to use the current darknet master branch, add the export code to it and change the fopen mode to "wb". Perhaps you may want to fix your darknet fork as well.

MohamedElsaeidy commented 3 years ago

git clone https://git.hipert.unimore.it/fgatti/darknet.git i think you should just use this repo for exporting only and make it without any changes , and it would for you pretty good

https://github.com/ceccocats/tkDNN/blob/master/docs/exporting_weights.md

alexkokh commented 3 years ago

Have you checked the links in the original post? Those two problems are in the repo you’re referring to. You can’t even build that code the way it is now and the export is producing corrupt files.

MohamedElsaeidy commented 3 years ago

for producing larger files , yes it does . i made 2 folders layers , debug and it worked fine. using this command ./darknet export layers

for convultion_kernals i didn't get issue with it. what model u trying to export

alexkokh commented 3 years ago

You don't seem to be understanding the problem. It's irrelevant what model is being exported. Binary files shouldn't be written in text mode. It may not make a difference in Linux, however it breaks Windows compatibility.

B1ackg0d commented 3 years ago

I also encountered the first problem you mentioned, and then I can compile after modifying it. T )KW4UHDVTA`G~H96C ZJ But my darknet still cannot generate debug files in Windows.

alexkokh commented 3 years ago

You don’t need the debug files for inference, as long as you have the correctly exported layer files you should be good. It’s easier to use the up to date darknet code instead of modifying individual files, except for the export code obviously.

ceccocats commented 3 years ago

Hi @alexkokh, thank you for pointing out this errors. In response of the listed issues:

As a quick workaround I suggest to compile darknet export repo in CPU only mode (as written in the readme ), since the unmerged change is inside a cudnn ifdef I haven't noticed that. Also the debug export is only supported in CPU mode. Since you don't need performance is pretty fine to run on CPU.

Best, Francesco