未验证 提交 ee4795d1 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix PADDLE_THROW in spectral_norm_op.h. test=develop (#24415)

上级 1a6c7ba2
......@@ -33,7 +33,9 @@ static inline void TransCompute(const int rank, const Tensor& in, Tensor* out,
const std::vector<int>& perm,
const DeviceContext& dev_ctx) {
if (rank <= 1 || rank > 5) {
PADDLE_THROW("Invalid weight rank.");
PADDLE_THROW(paddle::platform::errors::Fatal(
"Weight rank of SpectralNorm should be in range [2, 5], but got %d.",
rank));
}
switch (rank) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册