Open renshujiajia opened 4 days ago
Try to add
profile.set_shape(input_name, opt_shape, opt_shape, opt_shape) # for fixed shape
before config.add_optimization_profile(profile)
And check your preprocess code, or try minmax calibrator.
Try to add
profile.set_shape(input_name, opt_shape, opt_shape, opt_shape) # for fixed shape
before
config.add_optimization_profile(profile)
And check your preprocess code, or try minmax calibrator.
thanks alot, i will try the minmax calibrator, but isn't network.get_input(0).shape = opt_shape
and profile.set_shape(input_name, opt_shape, opt_shape, opt_shape) # for fixed shape
serve the same purpose? the exported model information is as follows:
input id: 0 istis input: True binding name: input shape: (1, 3, 4320, 7680) type: DataType.FLOAT
input id: 1 istis input: False binding name: output shape: (1, 3, 8640, 15360) type: DataType.FLOAT
If not profile.set_shape
, your profile is empty. In fact, for fixed shape model, need not care optimization_profile.
network.get_input(0).shape = opt_shape
and
profile.set_shape(input_name, opt_shape, opt_shape, opt_shape)
are diff roles.
Description
what is the right way to calibrate a hybrid quantization model ? i built my tensorrt engine from ONNX model by the sub code, i selected the
class Calibrator(trt.IInt8EntropyCalibrator2)
to set theconfig.int8_calibrator
My hybrid-quantized super-resolution model's inference results are biased towards magenta. I have performed clipping operations; what could be the possible reason for this? Is there an issue with my calibration code? Or could it be due to a poor distribution of the calibration dataset? i am sure that my infer program is absolute right.![image](https://github.com/NVIDIA/TensorRT/assets/27677934/d53bdfd8-5550-4a52-b4fd-39a56c6d978b)
Environment
TensorRT Version: 10.0.1
NVIDIA GPU: RTX4090
NVIDIA Driver Version: 12.0
CUDA Version: 12.0
CUDNN Version: 8.2.0
Operating System: Operating System: Linux interactive11554 5.11.0-27-generic https://github.com/NVIDIA/TensorRT/issues/29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Python Version (if applicable): 3,8,19