Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in EigenVector::Flatten method #2978

Merged
merged 2 commits into from
Jul 20, 2017

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Jul 20, 2017

No description provided.

@QiJune QiJune requested review from reyoung and wangkuiyi July 20, 2017 03:11
@@ -65,13 +65,15 @@ template <typename T, int MajorType = Eigen::RowMajor,
typename IndexType = Eigen::DenseIndex>
struct EigenVector : public EigenTensor<T, 1, MajorType, IndexType> {
// Flatten is to reshape a Tensor into a one dimension EigenVector
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can type alias a Parent inside EigenVector to make code below cleaner.

using Parent = EigenTensor<T, 1, MajorType, IndexType>;
Parent::Type Flatten(...) {
  return Parent::Type(...)
}

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.

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.

Sorry for late review, LGTM.

@QiJune QiJune merged commit 155f727 into PaddlePaddle:develop Jul 20, 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