-
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 Sparse MaxPool3D #42130
Add Sparse MaxPool3D #42130
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
from paddle.fluid.framework import _test_eager_guard | ||
|
||
|
||
class TestMaxPool3DFunc(unittest.TestCase): |
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.
后续增加一些测试
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.
ok
data_format="NDHWC", | ||
name=None): | ||
""" | ||
This API implements sparse max pooling 3d operation. |
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.
This API
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
""" | ||
This API implements sparse max pooling 3d operation. | ||
See more details in :ref:`api_sparse_pooling_MaxPool3d` . | ||
Args: |
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.
Please add a blank line before Args
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
Returns: | ||
Tensor: The output tensor of pooling result. The data type is same as input tensor. | ||
|
||
Raises: |
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.
Delete Raises
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
data_format="NDHWC", | ||
name=None): | ||
""" | ||
This API implements sparse max pooling 3d operation. |
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.
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
python/paddle/sparse/layer/pool.py
Outdated
|
||
# max pool3d | ||
input = paddle.randn((1, 3, 32, 32, 2)) | ||
MaxPool3D = nn.MaxPool3D(kernel_size=2, |
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.
Please use paddle.sparse.MaxPool3D
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.
已删除pool.py
@@ -0,0 +1,101 @@ | |||
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. |
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.
rm this file?
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.
已留pooling.py,删pool.py
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 for API docs
PR types
New features
PR changes
APIs
Describe
paddle.sparse.MaxPool3D
paddle.sparse.functional.max_pool3d
英文文档: