未验证 提交 93e36b06 编写于 作者: Z zhoutianzi666 提交者: GitHub

fix a bug in GetTrtWeight (#48993)

上级 4c0d46a8
......@@ -732,7 +732,7 @@ TensorRTEngine::Weight TensorRTEngine::GetTrtWeight(
for (int i = 0; i < weight_tensor.numel(); i++) {
int32_data[i] = int64_data[i];
}
weight.SetDataType(phi::DataType::FLOAT32);
weight.SetDataType(phi::DataType::INT32);
weight.SetValues(int32_data);
} else {
paddle::framework::TensorCopySync(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册