Skip to content

Commit

Permalink
[xdoctest][task 317] reformat example code with google style in pyth…
Browse files Browse the repository at this point in the history
…on/paddle/sparse/nn/layer/pooling.py (#57136)
  • Loading branch information
yoyoIcy authored Sep 11, 2023
1 parent 667b628 commit 7cf2c45
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/paddle/sparse/nn/layer/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class MaxPool3D(Layer):
Examples:
.. code-block:: python
import paddle
dense_x = paddle.randn((2, 3, 6, 6, 3))
sparse_x = dense_x.to_sparse_coo(4)
max_pool3d = paddle.sparse.nn.MaxPool3D(
kernel_size=3, data_format='NDHWC')
out = max_pool3d(sparse_x)
#shape=[2, 1, 2, 2, 3]
>>> import paddle
>>> dense_x = paddle.randn((2, 3, 6, 6, 3))
>>> sparse_x = dense_x.to_sparse_coo(4)
>>> max_pool3d = paddle.sparse.nn.MaxPool3D(
... kernel_size=3, data_format='NDHWC')
>>> out = max_pool3d(sparse_x)
>>> print(out.shape)
[2, 1, 2, 2, 3]
"""

def __init__(
Expand Down

0 comments on commit 7cf2c45

Please sign in to comment.