提交 c49adb86 编写于 作者: Q qijun

follow comments

上级 11e92317
......@@ -26,7 +26,9 @@ class SelectedRows {
platform::Place place() const { return value_->place(); }
Tensor& value() const { return *value_; }
const Tensor& value() const { return *value_; }
Tensor* mutable_value() { return value_.get(); }
int64_t height() const { return height_; }
......
......@@ -23,8 +23,8 @@ class SelectedRowsTester : public ::testing::Test {
int64_t row_numel = 100;
selected_rows_.reset(new SelectedRows(rows, height));
Tensor& value = selected_rows_->value();
value.mutable_data<float>(
Tensor* value = selected_rows_->mutable_value();
value->mutable_data<float>(
make_ddim({static_cast<int64_t>(rows.size()), row_numel}), place_);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册