yolo TensorRT almost DONE

This commit is contained in:
Francesco Gatti
2017-08-03 15:52:08 +02:00
parent 2ef76209a1
commit 858b3501fa
6 changed files with 96 additions and 7 deletions
+4 -5
View File
@@ -83,7 +83,7 @@ int main() {
tkDNN::Activation a23(&net, tkDNN::ACTIVATION_LEAKY);
tkDNN::Conv2d c24(&net, 1024, 3, 3, 1, 1, 1, 1, c24_bin, true);
tkDNN::Activation a24(&net, tkDNN::ACTIVATION_LEAKY);
/*
tkDNN::Layer *m25_layers[1] = { &a16 };
tkDNN::Route m25(&net, m25_layers, 1);
tkDNN::Conv2d c26(&net, 64, 1, 1, 1, 1, 0, 0, c26_bin, true);
@@ -96,9 +96,8 @@ int main() {
tkDNN::Conv2d c29(&net, 1024, 3, 3, 1, 1, 1, 1, c29_bin, true);
tkDNN::Activation a29(&net, tkDNN::ACTIVATION_LEAKY);
tkDNN::Conv2d c30(&net, 425, 1, 1, 1, 1, 0, 0, c30_bin, false);
// tkDNN::Region g31(&net, 80, 4, 5, 0.6f);
tkDNN::Region g31(&net, 80, 4, 5, 0.6f);
*/
// Load input
value_type *data;
value_type *input_h;
@@ -109,7 +108,7 @@ int main() {
value_type *out_data, *out_data2;
tkDNN::dataDim_t dim1 = dim;
std::cout<<"CUDNN inference:\n"; {
std::cout<<"\n==== CUDNN inference =======\n"; {
dim1.print(); //print initial dimension
TIMER_START
out_data = net.infer(dim1, data);
@@ -118,7 +117,7 @@ int main() {
}
tkDNN::dataDim_t dim2 = dim;
std::cout<<"TENSORRT inference:\n"; {
std::cout<<"\n==== TENSORRT inference ====\n"; {
dim2.print();
TIMER_START
out_data2 = netRT.infer(dim2, data);