提交 b920b516 编写于 作者: Y Yancey1989

rename parameter

上级 2917a75b
......@@ -122,7 +122,7 @@ bool SelectedRows::HasKey(int64_t key) const {
}
bool SelectedRows::Get(int64_t key, framework::Tensor* value,
int64_t row) const {
int64_t offset) const {
int64_t index = Index(key);
PADDLE_ENFORCE_GE(index, 0, "The key should be exists in the Table.");
PADDLE_ENFORCE(value->IsInitialized(),
......@@ -138,7 +138,7 @@ bool SelectedRows::Get(int64_t key, framework::Tensor* value,
framework::VisitDataType(
framework::ToDataType(value_->type()),
TensorCopyVisitor(cpu, value, row * value_width, *value_.get(),
TensorCopyVisitor(cpu, value, offset * value_width, *value_.get(),
index * value_width, value_width));
return true;
......
......@@ -81,7 +81,7 @@ class SelectedRows {
* @return true if the Get operation successed.
*/
bool Get(int64_t key, framework::Tensor* tensor, int64_t row = 0) const;
bool Get(int64_t key, framework::Tensor* tensor, int64_t offset = 0) const;
/*
* @brief Set a key-value pair into the table.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册