未验证 提交 91a8a257 编写于 作者: W Wilber 提交者: GitHub

enhance error info for py_func (#30138)

* enhance error info for py_func

* update
上级 6aa82e03
......@@ -112,7 +112,9 @@ static void CallPythonFunc(py::object *callable,
out->ShareDataWith(*py_out_tensor);
} catch (py::cast_error &) {
PADDLE_THROW(platform::errors::InvalidArgument(
"The %d-th output must be LoDTensor.", i));
"py::cast to LoDTensor error. The %d-th output expection is "
"LoDTensor",
i));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册