未验证 提交 a0bceafe 编写于 作者: P Pei Yang 提交者: GitHub

fix trt int8 calib precision bug. test=develop (#23036) (#23087)

上级 5915d3aa
...@@ -37,7 +37,8 @@ TRTInt8Calibrator::TRTInt8Calibrator( ...@@ -37,7 +37,8 @@ TRTInt8Calibrator::TRTInt8Calibrator(
temp_tensor.Resize(data_shape); temp_tensor.Resize(data_shape);
data_tensors_.push_back(temp_tensor); data_tensors_.push_back(temp_tensor);
data_buffers_[input_name] = std::pair<void*, size_t>( data_buffers_[input_name] = std::pair<void*, size_t>(
static_cast<void*>(temp_tensor.mutable_data<int16_t>(place)), num_ele); static_cast<void*>(temp_tensor.mutable_data<int16_t>(place)),
data_size);
i += 1; i += 1;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册