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

Feature/tensor array lod pack #5007

Merged

Conversation

Superjomn
Copy link
Contributor

@Superjomn Superjomn commented Oct 23, 2017

fixes: #4976

* returns a new LoDTensor
* - [a0 a0 a0 a1 a1]
*/
template <typename T>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function can be used for LodExpandOp

@@ -126,5 +126,57 @@ TEST_F(TensorArrayTester, size) {
ASSERT_EQ(ta.size(), static_cast<size_t>(batch_size));
}

TEST(TensorArray, LodPack) {
// three time steps, each step stores a LoDTensors
Copy link
Member

Choose a reason for hiding this comment

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

please add more explanation of this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add in next PR

Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

LGTM!

@Superjomn Superjomn merged commit 9a0233d into PaddlePaddle:develop Oct 25, 2017
@Superjomn Superjomn deleted the feature/tensor_array_lod_pack_unpack branch October 25, 2017 20:02
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.

TensorArray need a lod-based Pack/Unpack
2 participants