diff --git a/paddle/fluid/operators/clip_by_norm_op.h b/paddle/fluid/operators/clip_by_norm_op.h index 415cc975ecd6fd8d207ecdf40afd0263794b0130..a8d1e8e4661bff87da4c982d638fe56ef8e56ec7 100644 --- a/paddle/fluid/operators/clip_by_norm_op.h +++ b/paddle/fluid/operators/clip_by_norm_op.h @@ -65,7 +65,8 @@ class ClipByNormKernel : public framework::OpKernel { } else { PADDLE_THROW(platform::errors::InvalidArgument( "Invalid input variable type, only support LodTensor and " - "SelectedRows types.")); + "SelectedRows types, but got type is %s.", + framework::ToTypeName(in_var->Type()))); } PADDLE_ENFORCE_NOT_NULL(input,