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

add test_Expand and simply the gserver/tests/CMakeLists #5076

Merged
merged 3 commits into from
Oct 31, 2017
Merged

add test_Expand and simply the gserver/tests/CMakeLists #5076

merged 3 commits into from
Oct 31, 2017

Conversation

luotao1
Copy link
Contributor

@luotao1 luotao1 commented Oct 25, 2017

fix #5013

// CPU case 2. non-seq expand to sub-seq
// input1 = 1,2,3
// input2 = [[4,5]],[[6]],[[7],[8,9]]
// result = [[1,1]],[[2]],[[3],[3,3]]
Copy link
Contributor

Choose a reason for hiding this comment

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

如果input1 = 1,2,3,4
result应该等于多少?

Copy link
Contributor

@wanghaoshuang wanghaoshuang Oct 31, 2017

Choose a reason for hiding this comment

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

你怎么check input1和input2是合法的?

input1.batch_size == len(input2.seq)

还是

input1.batch_size == len(input2.sub_seq)

你去确定input1 = 1,2,3,4input1 = 1,2,3 都可以过这个check么?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

input1.batch_size == len(input2.seq),0维到2维的时候,目前的代码按照sequence level进行expand。所以1,2,3,4这个输入是不合法的。

// CPU case 3. seq expand to sub-seq
// input1 = [1,2],[3],[4]
// input2 = [[4,5]],[[6]],[[7],[8,9]]
// result = [[1,1]],[[2]],[[3],[4,4]]
Copy link
Contributor

Choose a reason for hiding this comment

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

如果input1 = [1,2],[3]
result应该等于什么?[[1,1]],[[2]],[[3],[3,3]]?

Copy link
Contributor

@wanghaoshuang wanghaoshuang left a comment

Choose a reason for hiding this comment

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

LGTM.

@luotao1 luotao1 merged commit ef2f0ec into PaddlePaddle:develop Oct 31, 2017
@luotao1 luotao1 deleted the expand_test branch October 31, 2017 09:11
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.

ExpandLayer get wrong result
2 participants