Docker api #242

Closed
mohitkhubele wants to merge 285 commits from docker_api into master
3 changed files with 10 additions and 2 deletions
Showing only changes of commit 03d2b88fa6 - Show all commits
+3
View File
@@ -1,6 +1,7 @@
#ifndef NETWORK_H
#define NETWORK_H
#include <string>
#include "utils.h"
namespace tk { namespace dnn {
@@ -62,6 +63,8 @@ public:
bool fp16, dla, int8;
bool dontLoadWeights;
std::string fileImgList;
std::string fileLabelList;
};
}}
+6
View File
@@ -34,6 +34,12 @@ Network::Network(dataDim_t input_dim) {
int8 = true;
}
}
if(const char* env_p = std::getenv("TKDNN_CALIB_IMG_PATH"))
fileImgList = env_p;
if(const char* env_p = std::getenv("TKDNN_CALIB_LABEL_PATH"))
fileLabelList = env_p;
if(fp16)
std::cout<<COL_REDB<<"!! FP16 INFERENCE ENABLED !!"<<COL_END<<"\n";
+1 -2
View File
@@ -73,8 +73,7 @@ NetworkRT::NetworkRT(Network *net, const char *name) {
// builderRT->setInt8Mode(true);
configRT->setFlag(BuilderFlag::kINT8);
BatchStream calibrationStream(dim, 1, 100, //TODO: check if 100 images are sufficient to the calibration (or 4951)
"/home/xavier/Documents/tkDNN/demo/COCO_val2017/all_images.txt",
"/home/xavier/Documents/tkDNN/demo/COCO_val2017/all_labels.txt");
net->fileImgList, net->fileLabelList);
std::string modelName = name;
calibrator.reset(new Int8EntropyCalibrator(calibrationStream, 1,
"./" + modelName.substr(0, modelName.find('.')) + "-calibration.table",