diff --git a/paddle/fluid/operators/clip_by_norm_op.h b/paddle/fluid/operators/clip_by_norm_op.h index f6f99369636268b2d628a211e636f8e0770cfbcf..348a26bba9453e022fa9cd036a4c0fa87d4877a0 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,