Skip to content

Conversation

@Yancey0623
Copy link
Contributor

@Yancey0623 Yancey0623 commented Apr 24, 2018

Fixed #10046
Task #9211

@jacquesqiao
Copy link
Member

Why should we add another lookup_table? In my mind, we can reuse the old lookup_table_op.

public:
LookupSparseTableOpMaker(OpProto *proto, OpAttrChecker *op_checker)
: framework::OpProtoAndCheckerMaker(proto, op_checker) {
AddInput("W",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can add an attribute "auto_add_id" or something like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@typhoonzero
Copy link
Contributor

Agree with @jacquesqiao , current lookup_table_op can also use Get to get value from the table if weight is SelectedRows

@Yancey0623
Copy link
Contributor Author

Hi @typhoonzero @jacquesqiao
Maybe we can't reuse lookup_table_op, because of the table variable is a const Input var in it. We need another new op to implement the Compute(No Kernel Op) so that we can edit the input var.

Copy link
Contributor

@typhoonzero typhoonzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Yancey0623 Yancey0623 merged commit ff99d94 into PaddlePaddle:develop May 2, 2018
@Yancey0623 Yancey0623 deleted the lookup_sparse_table_op branch May 2, 2018 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants