Skip to content

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Oct 25, 2017

Fix #5094
This PR depends on #5027
Because current operator backward tests are still based on run-time, not compile-time, we can not set correct Variable type in backward process.
I comment check_grad of test_sum_op for an example. test_word2vec and test_sum_op can pass ci test.

}
}

void CreateTensor(Variable* var, VarDesc::VarType var_type) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

static void CreateTensor()

Copy link
Member Author

Choose a reason for hiding this comment

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

Done


const Vector<int64_t>& rows() const { return rows_; }

Vector<int64_t>& mutable_rows() { return rows_; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Vector<int64_t>* mutable_rows()

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

}
};

template struct SelectedRowsAddTo<platform::CPUPlace, float>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

add double

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

out->Resize(in_vars[i]->Get<framework::LoDTensor>().dims());
break;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

39-44 lines are not necessary

Copy link
Collaborator

@reyoung reyoung left a comment

Choose a reason for hiding this comment

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

Excellent!

@QiJune QiJune merged commit 7f8574c into PaddlePaddle:develop Oct 26, 2017
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.

2 participants