未验证 提交 75fcd292 编写于 作者: L lujun 提交者: GitHub

update load_error_info, test=develop (#18000)

Repair error prompt: Users are prompted to check whether the model or parameter files are damaged when loading parameters are wrong.
上级 04ea7cb0
......@@ -65,7 +65,10 @@ class LoadCombineOpKernel : public framework::OpKernel<T> {
auto *tensor = out_vars[i]->GetMutable<framework::LoDTensor>();
// Error checking
PADDLE_ENFORCE(static_cast<bool>(*buffer), "Cannot read more");
PADDLE_ENFORCE(
static_cast<bool>(*buffer),
"There is a problem with loading model parameters. "
"Please check whether the model file is complete or damaged.");
// Get data from fin to tensor
DeserializeFromStream(*buffer, tensor, dev_ctx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册