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

release/2.0-alpha
Kaipeng Deng 5 years ago committed by GitHub
parent cd327e66df
commit 6435d1b4b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {

Loading…
Cancel
Save