From 12246a9d8168978452298af20b5cc1453360c12e Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 9 Feb 2018 13:40:58 +0800 Subject: [PATCH] Fix typo --- paddle/framework/tensor_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/framework/tensor_impl.h b/paddle/framework/tensor_impl.h index f75cc31b399..652d6b8a90e 100644 --- a/paddle/framework/tensor_impl.h +++ b/paddle/framework/tensor_impl.h @@ -61,7 +61,7 @@ static inline size_t SizeOfType(std::type_index type) { inline void Tensor::check_memory_size() const { PADDLE_ENFORCE_NOT_NULL( holder_, "Tensor holds no memory. Call Tensor::mutable_data first."); - PADDLE_ENFORCE_GE( + PADDLE_ENFORCE_LE( numel() * SizeOfType(type()), memory_size(), "Tensor's dims_ is out of bound. Call Tensor::mutable_data " "first to re-allocate memory.\n" -- GitLab