Closed beizhengren closed 4 years ago
Hi @beizhengren,
What do you mean? Adding a new kind of layer or adding a new layer in a model?
For example if you use test_yolo3 then the weights will be downloaded from the cloud and put into yolo3 in your build folder. If you want to use your exported weights, override the downloaded weights inside yolo3 folder.
Hi @ceccocats, Thanks for your quick reply.
A new kind of layer. Concretely, I have a project that can load tensorrt model or darknet files(cfg, weights) to inference. And there are some new layer tensorrt can not parse, so I want to use tkDNN to help solve it, for example yolov4. That is embedding tkDNN to my own project.
Some “Wrongs” prompted. My work flow as following I use the command
./darknet export cfg/yolov4.cfg yolov4.weights layers debug
and files of debug folder, as following
layers folder as following then run
./test_yolo4
1) To add a new layer you need to:
2) is it a regular yolo4 with different weights? Can you share the cfg? If the cfg is different from the one in the test folder you need to change the code.
@ceccocats
If the cfg is different from the one in the test folder you need to change the code.
That means I should put my cfg, which corresponding to my own weights, in thetkDNN-master/tests/yolo4
folder and replace the existed yolov4.cfg
?
Here is my yolov4 cfg
Hi, our test input size is 416x416, yours apper to be 608x608. You need to change the input dim of the network in yolo4.cpp. (line 9) Also check issue #10 you probably will get NaNs but is not an issue.
Hi, @ceccocats Sorry for I did't reply until now. I am so busy recently.
when I using the command:
./darknet export cfg/yolov4.cfg yolov4.weights layers debug
There ares a lot of files in layers
c0.bin c117.bin c132.bin c146.bin c159.bin c27.bin c41.bin c56.bin c6.bin c86.bin g139.bin
c100.bin c11.bin c133.bin c147.bin c15.bin c28.bin c43.bin c58.bin c71.bin c87.bin g150.bin
c102.bin c120.bin c134.bin c148.bin c160.bin c29.bin c44.bin c59.bin c72.bin c89.bin g161.bin
c104.bin c122.bin c135.bin c149.bin c16.bin c2.bin c46.bin c5.bin c74.bin c8.bin input.bin
c105.bin c123.bin c136.bin c14.bin c18.bin c31.bin c47.bin c60.bin c75.bin c90.bin output.bin
c106.bin c124.bin c137.bin c152.bin c19.bin c32.bin c49.bin c62.bin c77.bin c91.bin
c107.bin c125.bin c138.bin c154.bin c1.bin c34.bin c4.bin c63.bin c78.bin c93.bin
c10.bin c126.bin c141.bin c155.bin c21.bin c35.bin c50.bin c65.bin c80.bin c94.bin
c114.bin c127.bin c143.bin c156.bin c23.bin c37.bin c52.bin c66.bin c81.bin c96.bin
c115.bin c12.bin c144.bin c157.bin c24.bin c38.bin c54.bin c68.bin c83.bin c97.bin
c116.bin c130.bin c145.bin c158.bin c25.bin c40.bin c55.bin c69.bin c85.bin c99.bin
and none is in debug.
And how can I make this binary files to .trt file ? my cfg and weights are from https://github.com/AlexeyAB/darknet
Thanks!
@ceccocats I’ll try it. Thank you!
Closing for now, feel free to reopen.
1.How sholud I add a new layer with tkDNN? 2.How to manualize generating trt model? I use the command
And
auto generate yolo3_fp32.rt with exported bin files in cloud.