-
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 3DPoolingLayer #3504
Add 3DPoolingLayer #3504
Conversation
Start from "Add Pool3DLayer" |
6e70deb
to
c5d0439
Compare
Please remove 3DConv/3D-DeConv in this PR at first. |
c5d0439
to
52d9db3
Compare
52d9db3
to
2377d71
Compare
paddle/cuda/include/hl_cnn.h
Outdated
* @param[out] tgtData output data. | ||
* @param[in] tgtStride stride between output data samples. | ||
* | ||
*/ |
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.
remove comments, since the following argument names are clear.
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.
Done
} | ||
if (imgSizeW_ == 0) { | ||
// imgSizeW_ = imgSize_; | ||
} |
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.
If these codes are out of use, please remove them
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.
Done
paddle/math/Matrix.cpp
Outdated
size_t paddingD, | ||
size_t paddingH, | ||
size_t paddingW) { | ||
CHECK(inputMat.useGpu_ == true) << "Matrix type are not equal"; |
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(inputMat.useGpu_) << "Matrix type is not correct";
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.
Done
paddle/math/Matrix.cpp
Outdated
size_t paddingH, | ||
size_t paddingW) { | ||
CHECK(inputMat.useGpu_ == true && outGrad.useGpu_ == true && | ||
outV.useGpu_ == true) |
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(inputMat.useGpu_ && outGrad.useGpu_ && outV.useGpu_)
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.
Done
paddle/math/Matrix.cpp
Outdated
size_t paddingD, | ||
size_t paddingH, | ||
size_t paddingW) { | ||
CHECK(inputMat.useGpu_ == true) << "Matrix type are not equal"; |
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.
same as above.
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.
Done
outputH_, | ||
outputW_, | ||
1, | ||
1, |
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.
1.0
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.
Done
paddle/math/Matrix.h
Outdated
@@ -1506,6 +1670,82 @@ class CpuMatrix : public Matrix { | |||
real scaleOutput, | |||
size_t paddingH, | |||
size_t paddingW); | |||
////////////////////// |
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.
remove this line.
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.
Done
paddle/math/Matrix.h
Outdated
real scaleOutput, | ||
size_t paddingD, | ||
size_t paddingH, | ||
size_t paddingW); |
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.
虽然无关紧要,但是这些参数的顺序稍乱, 尤其把real scaleTargets
, real scaleOutput
莫名的插在中间~
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.
Done
|
||
cpuImage->randomizeUniform(); | ||
gpuImage->copyFrom(*cpuImage); | ||
// std::cout << "test maxPool3DForward...\n"; |
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.
remove this line.
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.
Done
TEST(Matrix, Pool3D) { | ||
for (auto depth : {9, 16, 64, 128}) { | ||
for (auto height : {9, 11, 128, 256}) { | ||
for (auto width : {9, 32, 128}) { |
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.
减少测试case~
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.
Done
c836000
to
b1c0bad
Compare
54629c0
to
43da767
Compare
9c24224
to
07985c9
Compare
07985c9
to
d747c5d
Compare
fix #438
Add 3DPoolingLayer.