__init__.py 8.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#   Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

15
# TODO: import all neural network related api under this directory,
16 17
# including layers, linear, conv, rnn etc.

18
from .activation import celu  # noqa: F401
Z
zhiboniu 已提交
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
from .activation import elu  # noqa: F401
from .activation import elu_  # noqa: F401
from .activation import gelu  # noqa: F401
from .activation import hardshrink  # noqa: F401
from .activation import hardtanh  # noqa: F401
from .activation import hardsigmoid  # noqa: F401
from .activation import hardswish  # noqa: F401
from .activation import leaky_relu  # noqa: F401
from .activation import log_sigmoid  # noqa: F401
from .activation import maxout  # noqa: F401
from .activation import prelu  # noqa: F401
from .activation import relu  # noqa: F401
from .activation import relu_  # noqa: F401
from .activation import relu6  # noqa: F401
from .activation import selu  # noqa: F401
from .activation import sigmoid  # noqa: F401
from .activation import silu  # noqa: F401
from .activation import softmax  # noqa: F401
from .activation import softmax_  # noqa: F401
from .activation import softplus  # noqa: F401
from .activation import softshrink  # noqa: F401
from .activation import softsign  # noqa: F401
from .activation import swish  # noqa: F401
42
from .activation import mish  # noqa: F401
Z
zhiboniu 已提交
43 44 45 46 47 48
from .activation import tanh  # noqa: F401
from .activation import tanh_  # noqa: F401
from .activation import tanhshrink  # noqa: F401
from .activation import thresholded_relu  # noqa: F401
from .activation import log_softmax  # noqa: F401
from .activation import glu  # noqa: F401
49
from .activation import gumbel_softmax  # noqa: F401
Z
zhiboniu 已提交
50 51 52 53 54 55
from .common import dropout  # noqa: F401
from .common import dropout2d  # noqa: F401
from .common import dropout3d  # noqa: F401
from .common import alpha_dropout  # noqa: F401
from .common import label_smooth  # noqa: F401
from .common import pad  # noqa: F401
56
from .common import zeropad2d  # noqa: F401
Z
zhiboniu 已提交
57 58
from .common import cosine_similarity  # noqa: F401
from .common import unfold  # noqa: F401
X
xiaoting 已提交
59
from .common import fold
Z
zhiboniu 已提交
60 61 62
from .common import interpolate  # noqa: F401
from .common import upsample  # noqa: F401
from .common import bilinear  # noqa: F401
63
from .common import class_center_sample  # noqa: F401
Z
zhiboniu 已提交
64 65 66 67 68 69 70 71
from .conv import conv1d  # noqa: F401
from .conv import conv1d_transpose  # noqa: F401
from .common import linear  # noqa: F401
from .conv import conv2d  # noqa: F401
from .conv import conv2d_transpose  # noqa: F401
from .conv import conv3d  # noqa: F401
from .conv import conv3d_transpose  # noqa: F401
from .extension import diag_embed  # noqa: F401
72
from .extension import sequence_mask
Z
zhiboniu 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
from .loss import binary_cross_entropy  # noqa: F401
from .loss import binary_cross_entropy_with_logits  # noqa: F401
from .loss import cross_entropy  # noqa: F401
from .loss import dice_loss  # noqa: F401
from .loss import hsigmoid_loss  # noqa: F401
from .loss import kl_div  # noqa: F401
from .loss import l1_loss  # noqa: F401
from .loss import log_loss  # noqa: F401
from .loss import margin_ranking_loss  # noqa: F401
from .loss import mse_loss  # noqa: F401
from .loss import nll_loss  # noqa: F401
from .loss import npair_loss  # noqa: F401
from .loss import sigmoid_focal_loss  # noqa: F401
from .loss import smooth_l1_loss  # noqa: F401
from .loss import softmax_with_cross_entropy  # noqa: F401
88
from .loss import margin_cross_entropy  # noqa: F401
Z
zhiboniu 已提交
89 90
from .loss import square_error_cost  # noqa: F401
from .loss import ctc_loss  # noqa: F401
91
from .loss import hinge_embedding_loss  # noqa: F401
Z
zhiboniu 已提交
92 93 94 95 96 97 98 99 100 101 102
from .norm import batch_norm  # noqa: F401
from .norm import instance_norm  # noqa: F401
from .norm import layer_norm  # noqa: F401
from .norm import local_response_norm  # noqa: F401
from .norm import normalize  # noqa: F401
from .pooling import avg_pool1d  # noqa: F401
from .pooling import avg_pool2d  # noqa: F401
from .pooling import avg_pool3d  # noqa: F401
from .pooling import max_pool1d  # noqa: F401
from .pooling import max_pool2d  # noqa: F401
from .pooling import max_pool3d  # noqa: F401
103

Z
zhiboniu 已提交
104 105 106 107 108 109
from .pooling import adaptive_max_pool1d  # noqa: F401
from .pooling import adaptive_max_pool2d  # noqa: F401
from .pooling import adaptive_max_pool3d  # noqa: F401
from .pooling import adaptive_avg_pool1d  # noqa: F401
from .pooling import adaptive_avg_pool2d  # noqa: F401
from .pooling import adaptive_avg_pool3d  # noqa: F401
110
from .pooling import max_unpool1d  # noqa: F401
111
from .pooling import max_unpool2d  # noqa: F401
112
from .pooling import max_unpool3d  # noqa: F401
113

Z
zhiboniu 已提交
114 115 116
from .vision import affine_grid  # noqa: F401
from .vision import grid_sample  # noqa: F401
from .vision import pixel_shuffle  # noqa: F401
117
from .vision import channel_shuffle  # noqa: F401
Z
zhiboniu 已提交
118 119 120 121 122
from .input import one_hot  # noqa: F401
from .input import embedding  # noqa: F401
from ...fluid.layers import gather_tree  # noqa: F401
from ...fluid.layers import temporal_shift  # noqa: F401

123 124
from .sparse_attention import sparse_attention

Z
zhiboniu 已提交
125
__all__ = [     #noqa
126
           'celu',
Z
zhiboniu 已提交
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
           'conv1d',
           'conv1d_transpose',
           'conv2d',
           'conv2d_transpose',
           'conv3d',
           'conv3d_transpose',
           'elu',
           'elu_',
           'gelu',
           'hardshrink',
           'hardtanh',
           'hardsigmoid',
           'hardswish',
           'leaky_relu',
           'log_sigmoid',
           'maxout',
           'prelu',
           'relu',
           'relu_',
           'relu6',
           'selu',
           'softmax',
           'softmax_',
           'softplus',
           'softshrink',
           'softsign',
           'sigmoid',
           'silu',
           'swish',
156
           'mish',
Z
zhiboniu 已提交
157 158 159 160 161 162
           'tanh',
           'tanh_',
           'tanhshrink',
           'thresholded_relu',
           'log_softmax',
           'glu',
163
           'gumbel_softmax',
Z
zhiboniu 已提交
164 165 166 167 168 169 170 171 172
           'diag_embed',
           'sequence_mask',
           'dropout',
           'dropout2d',
           'dropout3d',
           'alpha_dropout',
           'label_smooth',
           'linear',
           'pad',
173
           'zeropad2d',
Z
zhiboniu 已提交
174 175 176 177 178 179 180 181 182 183 184
           'unfold',
           'interpolate',
           'upsample',
           'bilinear',
           'cosine_similarity',
           'avg_pool1d',
           'avg_pool2d',
           'avg_pool3d',
           'max_pool1d',
           'max_pool2d',
           'max_pool3d',
185
           'max_unpool1d',
186
           'max_unpool2d',
187
           'max_unpool3d',
Z
zhiboniu 已提交
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
           'adaptive_avg_pool1d',
           'adaptive_avg_pool2d',
           'adaptive_avg_pool3d',
           'adaptive_max_pool1d',
           'adaptive_max_pool2d',
           'adaptive_max_pool3d',
           'binary_cross_entropy',
           'binary_cross_entropy_with_logits',
           'cross_entropy',
           'dice_loss',
           'hsigmoid_loss',
           'kl_div',
           'l1_loss',
           'log_loss',
           'mse_loss',
           'margin_ranking_loss',
           'nll_loss',
           'npair_loss',
           'sigmoid_focal_loss',
           'smooth_l1_loss',
           'softmax_with_cross_entropy',
209
           'margin_cross_entropy',
Z
zhiboniu 已提交
210 211
           'square_error_cost',
           'ctc_loss',
212
           'hinge_embedding_loss',
Z
zhiboniu 已提交
213 214 215 216
           'affine_grid',
           'grid_sample',
           'local_response_norm',
           'pixel_shuffle',
217
           'channel_shuffle',
Z
zhiboniu 已提交
218 219 220
           'embedding',
           'gather_tree',
           'one_hot',
221
           'normalize',
222 223 224
           'temporal_shift',
           'batch_norm',
           'layer_norm',
225 226
           'instance_norm',
           'class_center_sample',
227
           'sparse_attention',
X
xiaoting 已提交
228
           'fold',
Z
zhiboniu 已提交
229
]