-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Conversation
paddle/gserver/tests/test_Expand.cpp
Outdated
// 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]] |
There was a problem hiding this comment.
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应该等于多少?
There was a problem hiding this comment.
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,4
和 input1 = 1,2,3
都可以过这个check么?
There was a problem hiding this comment.
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]] |
There was a problem hiding this comment.
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]]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
fix #5013