Add different yolov4 size tests

Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
Micaela Verucchi
2020-06-11 12:43:34 +02:00
parent be9e327aef
commit c4e955eab5
11 changed files with 3596 additions and 14 deletions
+9 -7
View File
@@ -83,7 +83,7 @@ void printDeviceVector(int size, dnnType* vec_d, bool device){
delete [] vec;
}
int checkResult(int size, dnnType *data_d, dnnType *correct_d, bool device, int limit) {
int checkResult(int size, dnnType *data_d, dnnType *correct_d, bool device, int limit, bool verbose) {
dnnType *data_h, *correct_h;
const float eps = 0.02f;
@@ -117,13 +117,15 @@ int checkResult(int size, dnnType *data_d, dnnType *correct_d, bool device, int
delete [] correct_h;
}
std::cout<<" | ";
if(diffs == 0)
std::cout<<COL_GREENB<<"OK";
else
std::cout<<COL_REDB<<"Wrongs: "<<diffs;
if(verbose){
std::cout<<" | ";
if(diffs == 0)
std::cout<<COL_GREENB<<"OK";
else
std::cout<<COL_REDB<<"Wrongs: "<<diffs;
std::cout<<COL_END<<" ~"<<eps<<"\n";
std::cout<<COL_END<<" ~"<<eps<<"\n";
}
return diffs;
}