32 lines
1.2 KiB
C++
32 lines
1.2 KiB
C++
#pragma once
|
|
|
|
/* --------------------------------------------------------
|
|
* These configs are related to tensorrt model, if these are changed,
|
|
* please re-compile and re-serialize the tensorrt model.
|
|
* --------------------------------------------------------*/
|
|
|
|
// For INT8, you need prepare the calibration dataset, please refer to
|
|
#define USE_FP32 // set USE_INT8 or USE_FP16 or USE_FP32
|
|
|
|
// These are used to define input/output tensor names,
|
|
// you can set them to whatever you want.
|
|
const static char* kInputTensorName = "data";
|
|
const static char* kOutputTensorName = "prob";
|
|
|
|
constexpr static int kBatchSize = 1;
|
|
|
|
// input width and height must by divisible by 32
|
|
constexpr static int kInputH = 256;
|
|
constexpr static int kInputW = 256;
|
|
|
|
/* --------------------------------------------------------
|
|
* These configs are NOT related to tensorrt model, if these are changed,
|
|
* please re-compile, but no need to re-serialize the tensorrt model.
|
|
* --------------------------------------------------------*/
|
|
|
|
// default GPU_id
|
|
const static int kGpuId = 0;
|
|
|
|
// If your image size is larger than 4096 * 3112, please increase this value
|
|
const static int kMaxInputImageSize = 4096 * 3112;
|