From bbf884da34667dfe0ed70cef6c38aebe8e017951 Mon Sep 17 00:00:00 2001 From: "ysh329@sina.com" Date: Sun, 27 Sep 2020 08:36:34 +0000 Subject: [PATCH] Fix clip_by_norm_op error message. test=develop --- paddle/fluid/operators/clip_by_norm_op.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/clip_by_norm_op.h b/paddle/fluid/operators/clip_by_norm_op.h index f6f99369636..348a26bba94 100644 --- a/paddle/fluid/operators/clip_by_norm_op.h +++ b/paddle/fluid/operators/clip_by_norm_op.h @@ -63,8 +63,8 @@ class ClipByNormKernel : public framework::OpKernel { output->Resize(merged_input->value().dims()); output->mutable_data(context.GetPlace()); } else { - PADDLE_THROW("Unexpected branch, input variable type is %s", - framework::ToTypeName(in_var->Type())); + PADDLE_THROW( + platform::errors::InvalidArgument("invalid input variable type")); } PADDLE_ENFORCE_NOT_NULL(input, -- GitLab