From 11e923176ebe1f77c8953c10bf35263b0dbf72a5 Mon Sep 17 00:00:00 2001 From: qijun Date: Thu, 12 Oct 2017 20:36:34 -0700 Subject: [PATCH] reset a new tensor in default constructor of SelectedRows --- paddle/framework/selected_rows.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/framework/selected_rows.h b/paddle/framework/selected_rows.h index 2bd6b160b..417904ea8 100644 --- a/paddle/framework/selected_rows.h +++ b/paddle/framework/selected_rows.h @@ -22,7 +22,7 @@ class SelectedRows { value_.reset(new Tensor()); } - SelectedRows() {} + SelectedRows() { value_.reset(new Tensor()); } platform::Place place() const { return value_->place(); } -- GitLab