Skip to content
Snippets Groups Projects
Commit ce0618ab authored by Nathan Thoumine's avatar Nathan Thoumine
Browse files

Set the number of calibration files based on the number of files in the calibration folder

parent 7273399a
No related branches found
No related tags found
No related merge requests found
......@@ -119,11 +119,10 @@ void Graph::datamode(nvinfer1::DataType datatype)
}
closedir(pDir);
}
unsigned int nbCalibFiles = 1;
unsigned int nbCalibFiles = filesCalib.size();
if(nbCalibFiles == 0) std::cout << "Cannot find calibration files in dir " << calibDir << std::endl;
unsigned int batchSize = 1;
BatchStream calibrationStream(batchSize, 3, 32, 32, nbCalibFiles, this->_calibPath);
BatchStream calibrationStream(1, 3, 32, 32, nbCalibFiles, this->_calibPath);
this->_calibrator = new Int8EntropyCalibrator(calibrationStream, 0, this->_cachePath);
this->_builderconfig->setInt8Calibrator(this->_calibrator);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment