lewes6369 / TensorRT-Yolov3

TensorRT for Yolov3
MIT License
489 stars 165 forks source link

Compile error on RHEL 7.6 and Ubuntu 18.04 #60

Open qili93 opened 5 years ago

qili93 commented 5 years ago

Found some build error in RHEL 7.5 and Ubuntu 18.04 and append the code diff here

  1. RHEL 7.6

    $ git diff --ignore-all-space
    diff --git a/eval.cpp b/eval.cpp
    index c196fc8..daa9e17 100755
    --- a/eval.cpp
    +++ b/eval.cpp
    @@ -151,7 +151,7 @@ namespace Tn
             precision[i] = TP / total;
    
             //compute AP:
    -            sort(checkPRBoxs.begin(),checkPRBoxs.end(),[](CheckPair& left,CheckPair& right){
    +            sort(checkPRBoxs.begin(),checkPRBoxs.end(),[](const CheckPair& left, const CheckPair& right){
                 return left.first.score > right.first.score;
                 }
             );
    diff --git a/include/dataReader.h b/include/dataReader.h
    index 39b47bb..17bf20b 100644
    --- a/include/dataReader.h
    +++ b/include/dataReader.h
    @@ -4,6 +4,7 @@
    #include <vector>
    #include <list>
    #include <string>
    +#include <tuple>
    
    namespace Tn
    {
  2. Ubuntu 18.04

    
    $ git diff --ignore-all-space
    diff --git a/eval.cpp b/eval.cpp
    index c196fc8..a21f5d2 100755
    --- a/eval.cpp
    +++ b/eval.cpp
    @@ -3,6 +3,7 @@
    #include <assert.h>
    #include <iostream>
    #include <iomanip>
    +#include <cmath>
    
    using namespace std;

@@ -146,7 +147,7 @@ namespace Tn }

         //recall:
lewes6369 commented 4 years ago

Thanks, I modified as your suggestion.