From 57a22db3fad1251a50d3d3dd2f241ad7f1949d77 Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Fri, 14 Jul 2017 19:43:59 +0800 Subject: [PATCH] update PADDLE_ENFORCE message --- paddle/framework/tensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/framework/tensor.h b/paddle/framework/tensor.h index d98706e6ed8..62e0710a824 100644 --- a/paddle/framework/tensor.h +++ b/paddle/framework/tensor.h @@ -48,7 +48,7 @@ class Tensor { T* mutable_data(paddle::platform::Place place) { PADDLE_ENFORCE(numel_ > 0, "Tensor::numel_ must be larger than zero to call " - "Tensor::mutable_data."); + "Tensor::mutable_data. Call Tensor::set_dim first."); if (holder_ == nullptr || !(holder_->place() == place) /* some versions of boost::variant don't have operator!= */ -- GitLab