Closed zjZSTU closed 4 years ago
I'm getting this same issue with yolov4-tiny, same steps only I get
Error reading file yolo4/layers/g30.bin with n of float 570 seek: 0 size:20280
You are using a different cfg from yolo4? test_yolo4 must load your yolov4-obj.cfg
In terms of training my own thing, I actually just read some more issues and this worked: https://github.com/ceccocats/tkDNN/issues/52#issuecomment-662473806 Not sure if that's what OP was asking about
In terms of training my own thing, I actually just read some more issues and this worked: #52 (comment) Not sure if that's what OP was asking about
hi @ceccocats @piepieninja, i solved my problem. thank for yours reply
i trained own dataset for six classes, so there was a problem when using ./test_yolo4
to create .rt file. This should be done:
/tests/darknet
, copy yolo4.cpp to yolo4_custom.cpp std::string cfg_path = std::string(TKDNN_PATH) + "/tests/darknet/cfg/yolo4.cfg";
std::string name_path = std::string(TKDNN_PATH) + "/tests/darknet/names/coco.names";
using own .cfg and .names file
$ rm -rf build
$ mkdir build
$ cd build
$ cmake ..
$ make
in build/
, you can get executable file yolo4_custom
./build/yolo4/
, mv layers/
and debug/
into it, run./yolo4_custom
...
...
268 Yolo 19 x 19, 33 -> 19 x 19, 33
===========================================================
GPU free memory: 2933.93 mb.
New NetworkRT (TensorRT v7.1)
Float16 support: 1
Int8 support: 1
DLAs: 2
Selected maxBatchSize: 4
GPU free memory: 2547.96 mb.
Building tensorRT cuda engine...
serialize net
create execution context
Input/outputs numbers: 4
input idex = 0 -> output index = 3
Data dim: 1 3 608 608 1
Data dim: 1 33 19 19 1
RtBuffer 0 dim: Data dim: 1 3 608 608 1
RtBuffer 1 dim: Data dim: 1 33 76 76 1
RtBuffer 2 dim: Data dim: 1 33 38 38 1
RtBuffer 3 dim: Data dim: 1 33 19 19 1
====== CUDNN inference ======
Data dim: 1 3 608 608 1
Data dim: 1 33 19 19 1
===== TENSORRT inference ====
Data dim: 1 3 608 608 1
Data dim: 1 33 19 19 1
=== OUTPUT 0 CHECK RESULTS ==
CUDNN vs correct | OK ~0.02
TRT vs correct
| [ 1396 ]: 0.458866 0.48307
| [ 1472 ]: 0.57735 0.603257
| [ 1620 ]: 0.509987 0.535873
| [ 3125 ]: 0.527447 0.507159
| [ 4148 ]: 0.541243 0.519599
| [ 4305 ]: 0.728546 0.707675
| [ 4314 ]: 0.406434 0.433637
| [ 4381 ]: 0.560149 0.534244
| [ 4547 ]: 0.400655 0.421259
| Wrongs: 1376 ~0.02
CUDNN vs TRT
| [ 1396 ]: 0.483033 0.458866
| [ 1472 ]: 0.603223 0.57735
| [ 1620 ]: 0.535915 0.509987
| [ 3125 ]: 0.507174 0.527447
| [ 4148 ]: 0.519642 0.541243
| [ 4305 ]: 0.70762 0.728546
| [ 4314 ]: 0.433672 0.406434
| [ 4381 ]: 0.534179 0.560149
| [ 4547 ]: 0.42129 0.400655
| Wrongs: 1372 ~0.02
=== OUTPUT 1 CHECK RESULTS ==
CUDNN vs correct | OK ~0.02
TRT vs correct
| [ 54 ]: 0.565153 0.537672
| [ 55 ]: 0.456518 0.431752
| [ 357 ]: 0.294531 0.320589
| [ 394 ]: 0.57262 0.595539
| [ 1537 ]: 0.460857 0.483783
| [ 1538 ]: 0.53794 0.561384
| [ 1798 ]: 0.626915 0.647547
| [ 2576 ]: 0.513811 0.53931
| [ 2894 ]: 0.501953 0.522789
| Wrongs: 397 ~0.02
CUDNN vs TRT
| [ 54 ]: 0.537726 0.565153
| [ 55 ]: 0.431785 0.456518
| [ 357 ]: 0.320566 0.294531
| [ 394 ]: 0.595514 0.57262
| [ 1537 ]: 0.483744 0.460857
| [ 1538 ]: 0.561364 0.53794
| [ 1798 ]: 0.64758 0.626915
| [ 2576 ]: 0.539305 0.513811
| [ 2894 ]: 0.52281 0.501953
| Wrongs: 397 ~0.02
=== OUTPUT 2 CHECK RESULTS ==
CUDNN vs correct | OK ~0.02
TRT vs correct
| [ 744 ]: -0.882812 -0.860113
| [ 1845 ]: 0.488558 0.468554
| [ 1888 ]: 0.574395 0.544778
| [ 2018 ]: 0.621771 0.642833
| [ 2120 ]: 0.51687 0.537387
| [ 2121 ]: 0.39946 0.423939
| [ 2122 ]: 0.353875 0.376532
| [ 2286 ]: 0.576125 0.602082
| [ 2917 ]: 0.356783 0.335187
| Wrongs: 60 ~0.02
CUDNN vs TRT
| [ 744 ]: -0.860134 -0.882812
| [ 1888 ]: 0.544778 0.574395
| [ 2018 ]: 0.642876 0.621771
| [ 2120 ]: 0.537414 0.51687
| [ 2121 ]: 0.423974 0.39946
| [ 2122 ]: 0.376583 0.353875
| [ 2286 ]: 0.602043 0.576125
| [ 2917 ]: 0.335207 0.356783
| [ 3332 ]: 0.389784 0.366363
| Wrongs: 59 ~0.02
done
@zjZSTU @mive93 I followed the same like your comment but I am getting the following error.
=== OUTPUT 0 CHECK RESULTS == Error opening file yolo3tiny_custom/debug/layer16_out.bin /home/nvidia/Development/tkDNN/src/utils.cpp:45 Aborting...
There is no layer16_out.bin inside the debug folder.
I'm getting this same issue with yolov4-tiny, same steps only I get
Error reading file yolo4/layers/g30.bin with n of float 570 seek: 0 size:20280
Hi. I met same error, "Error reading file layers/g30.bin with n of float: 6591 seek: 0 size: 26364" I know too much time has passed. but the problem is different from c~~.bin or input.bin errors I think. So I need your help. How did you solve your problem?
hi tkDNN, i met a question when export darknet
reproduce
move the debugs/ and layers/ to tkDNN/build/yolo4
finally, run the test_yolo4 command
what's wrong with it? please help me