__init__.py 7.7 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
50
from .activation import rrelu  # noqa: F401
Z
zhiboniu 已提交
51 52 53 54 55 56
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
57
from .common import zeropad2d  # noqa: F401
Z
zhiboniu 已提交
58 59
from .common import cosine_similarity  # noqa: F401
from .common import unfold  # noqa: F401
X
xiaoting 已提交
60
from .common import fold
Z
zhiboniu 已提交
61 62 63
from .common import interpolate  # noqa: F401
from .common import upsample  # noqa: F401
from .common import bilinear  # noqa: F401
64
from .common import class_center_sample  # noqa: F401
Z
zhiboniu 已提交
65 66 67 68 69 70 71 72
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
73
from .extension import sequence_mask
Z
zhiboniu 已提交
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
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
89
from .loss import margin_cross_entropy  # noqa: F401
Z
zhiboniu 已提交
90 91
from .loss import square_error_cost  # noqa: F401
from .loss import ctc_loss  # noqa: F401
92
from .loss import hinge_embedding_loss  # noqa: F401
93
from .loss import cosine_embedding_loss  # noqa: F401
Y
yangguohao 已提交
94
from .loss import triplet_margin_with_distance_loss
Y
yangguohao 已提交
95
from .loss import triplet_margin_loss
Z
zhiboniu 已提交
96 97 98 99 100 101 102 103 104 105 106
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
107

Z
zhiboniu 已提交
108 109 110 111 112 113
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
114
from .pooling import max_unpool1d  # noqa: F401
115
from .pooling import max_unpool2d  # noqa: F401
116
from .pooling import max_unpool3d  # noqa: F401
117

Z
zhiboniu 已提交
118 119 120
from .vision import affine_grid  # noqa: F401
from .vision import grid_sample  # noqa: F401
from .vision import pixel_shuffle  # noqa: F401
121
from .vision import pixel_unshuffle  # noqa: F401
122
from .vision import channel_shuffle  # noqa: F401
Z
zhiboniu 已提交
123 124
from .input import one_hot  # noqa: F401
from .input import embedding  # noqa: F401
125 126
from .extension import gather_tree  # noqa: F401
from .extension import temporal_shift  # noqa: F401
Z
zhiboniu 已提交
127

128 129
from .sparse_attention import sparse_attention

Y
yangguohao 已提交
130
__all__ = [  # noqa
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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
    'celu',
    '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',
    'mish',
    'tanh',
    'tanh_',
    'tanhshrink',
    'thresholded_relu',
    'log_softmax',
    'glu',
    'gumbel_softmax',
    'diag_embed',
    'sequence_mask',
    'dropout',
    'dropout2d',
    'dropout3d',
    'alpha_dropout',
    'label_smooth',
    'linear',
    'pad',
    'zeropad2d',
    'unfold',
    'interpolate',
    'upsample',
    'bilinear',
    'cosine_similarity',
    'avg_pool1d',
    'avg_pool2d',
    'avg_pool3d',
    'max_pool1d',
    'max_pool2d',
    'max_pool3d',
    'max_unpool1d',
    'max_unpool2d',
    'max_unpool3d',
    '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',
    'margin_cross_entropy',
    'square_error_cost',
    'ctc_loss',
    'hinge_embedding_loss',
    'affine_grid',
    'grid_sample',
    'local_response_norm',
    'pixel_shuffle',
    'pixel_unshuffle',
    'channel_shuffle',
    'embedding',
    'gather_tree',
    'one_hot',
    'normalize',
    'temporal_shift',
    'batch_norm',
    'layer_norm',
    'instance_norm',
    'class_center_sample',
    'sparse_attention',
    'fold',
235
    'cosine_embedding_loss',
236
    'rrelu',
Y
yangguohao 已提交
237
    'triplet_margin_with_distance_loss',
Y
yangguohao 已提交
238
    'triplet_margin_loss',
Z
zhiboniu 已提交
239
]