diff --git a/paddle/fluid/inference/tensorrt/trt_int8_calibrator.cc b/paddle/fluid/inference/tensorrt/trt_int8_calibrator.cc index 4a85c8b8fe6d70052edd3be59f98582c9b2e86b9..a6fbce2e0ee2ee6e3ec6bea70e630ff89884cefd 100644 --- a/paddle/fluid/inference/tensorrt/trt_int8_calibrator.cc +++ b/paddle/fluid/inference/tensorrt/trt_int8_calibrator.cc @@ -37,7 +37,8 @@ TRTInt8Calibrator::TRTInt8Calibrator( temp_tensor.Resize(data_shape); data_tensors_.push_back(temp_tensor); data_buffers_[input_name] = std::pair( - static_cast(temp_tensor.mutable_data(place)), num_ele); + static_cast(temp_tensor.mutable_data(place)), + data_size); i += 1; } }