[API 2.0] add pool2d3d API,test=develop (#26331)

* add pool2d3d API,test=develop

* add api unitest,test=develop

* fix unittest, test=develop

* fix reviews, test=develop

* return one element when return indices is true, test=develop

* fix low converage; to_variable to to_tensor, test=develop

* sort API params, test=develop

* fix en doc, merge PR#26108 to here, test=develop

* fix en doc, test=develop
test_feature_precision_test_c
Double_V 5 years ago committed by GitHub
parent 78ca8cf0c8
commit c8e18360f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -25,6 +25,8 @@ from . import extension
__all__ += extension.__all__
from . import common
__all__ += common.__all__
from . import pooling
__all__ += pooling.__all__
from . import loss
__all__ += loss.__all__
from .activation import brelu #DEFINE_ALIAS
@ -166,10 +168,18 @@ from .norm import l2_normalize #DEFINE_ALIAS
from .norm import lrn #DEFINE_ALIAS
from .norm import normalize #DEFINE_ALIAS
# from .norm import spectral_norm #DEFINE_ALIAS
from .pooling import max_pool1d #DEFINE_ALIAS
from .pooling import avg_pool1d #DEFINE_ALIAS
from .pooling import adaptive_max_pool1d #DEFINE_ALIAS
from .pooling import adaptive_avg_pool1d #DEFINE_ALIAS
from .pooling import pool2d #DEFINE_ALIAS
from .pooling import pool3d #DEFINE_ALIAS
from .pooling import adaptive_pool2d #DEFINE_ALIAS
from .pooling import adaptive_pool3d #DEFINE_ALIAS
from .pooling import avg_pool2d #DEFINE_ALIAS
from .pooling import max_pool2d #DEFINE_ALIAS
from .pooling import avg_pool3d #DEFINE_ALIAS
from .pooling import max_pool3d #DEFINE_ALIAS
from .pooling import adaptive_avg_pool2d #DEFINE_ALIAS
from .pooling import adaptive_avg_pool3d #DEFINE_ALIAS
# from .rnn import gru_unit #DEFINE_ALIAS

File diff suppressed because it is too large Load Diff

@ -60,6 +60,14 @@ from .common import Dropout3D #DEFINE_ALIAS
from .common import AlphaDropout #DEFINE_ALIAS
from .pooling import AdaptiveAvgPool2d #DEFINE_ALIAS
from .pooling import AdaptiveAvgPool3d #DEFINE_ALIAS
from .pooling import AvgPool1d #DEFINE_ALIAS
from .pooling import MaxPool1d #DEFINE_ALIAS
from .pooling import AdaptiveAvgPool1d #DEFINE_ALIAS
from .pooling import AdaptiveMaxPool1d #DEFINE_ALIAS
from .pooling import AvgPool2d #DEFINE_ALIAS
from .pooling import MaxPool2d #DEFINE_ALIAS
from .pooling import AvgPool3d #DEFINE_ALIAS
from .pooling import MaxPool3d #DEFINE_ALIAS
from .conv import Conv1d #DEFINE_ALIAS
from .conv import Conv2d #DEFINE_ALIAS
from .conv import Conv3d #DEFINE_ALIAS

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: define the common classes to build a neural network
# TODO: define the common classes to build a neural network
from ...fluid.dygraph import BilinearTensorProduct #DEFINE_ALIAS
from ...fluid.dygraph import Pool2D #DEFINE_ALIAS
from ...fluid.dygraph import Embedding #DEFINE_ALIAS
@ -583,8 +583,8 @@ class ReflectionPad1d(layers.Layer):
Default is "NCL"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -642,8 +642,8 @@ class ReplicationPad1d(layers.Layer):
Default is "NCL"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -657,7 +657,7 @@ class ReplicationPad1d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -702,8 +702,8 @@ class ConstantPad1d(layers.Layer):
Default is "NCL"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -718,7 +718,7 @@ class ConstantPad1d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -765,8 +765,8 @@ class ConstantPad2d(layers.Layer):
Default is "NCHW"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -781,7 +781,7 @@ class ConstantPad2d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -830,8 +830,8 @@ class ZeroPad2d(layers.Layer):
Default is "NCHW"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -845,7 +845,7 @@ class ZeroPad2d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -892,8 +892,8 @@ class ReplicationPad2d(layers.Layer):
Default is "NCHW"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -907,7 +907,7 @@ class ReplicationPad2d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -954,8 +954,8 @@ class ReflectionPad2d(layers.Layer):
Default is "NCHW"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -969,7 +969,7 @@ class ReflectionPad2d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -1019,8 +1019,8 @@ class ConstantPad3d(layers.Layer):
Default is "NCDHW"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -1035,7 +1035,7 @@ class ConstantPad3d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -1084,8 +1084,8 @@ class ReplicationPad3d(layers.Layer):
Default is "NCDHW"
name (str, optional) : The default value is None. Normally there is no need for
user to set this property. For more information, please refer to :ref:`api_guide_Name`.
Returns:
Returns:
None
Examples:
@ -1099,7 +1099,7 @@ class ReplicationPad3d(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np
@ -1141,7 +1141,7 @@ class CosineSimilarity(layers.Layer):
Parameters:
axis (int): Dimension of vectors to compute cosine similarity. Default is 1.
eps(float): Small value to avoid division by zero. Default is 1e-8.
Returns:
Returns:
None
Examples:
@ -1162,7 +1162,7 @@ class CosineSimilarity(layers.Layer):
Code Examples:
.. code-block:: python
import paddle
import paddle.nn as nn
import numpy as np

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save