__init__.py 4.5 KB
Newer Older
L
Leo Chen 已提交
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: define activation functions of neural network
L
Leo Chen 已提交
16

17
from . import activation
L
Leo Chen 已提交
18
from . import loss
19
from . import conv
20 21
from . import extension
from . import activation
22
from . import norm
F
Feiyu Chan 已提交
23
from . import rnn
R
ruri 已提交
24
from . import vision
25
from . import distance
26
from . import transformer
27

28
from .activation import *
29 30
from .loss import *
from .conv import *
31 32
from .extension import *
from .activation import *
33
from .norm import *
F
Feiyu Chan 已提交
34
from .rnn import *
R
ruri 已提交
35 36
from .vision import *

37
from .transformer import *
38 39
# from .activation import PReLU        #DEFINE_ALIAS
from .activation import ReLU  #DEFINE_ALIAS
C
ceci3 已提交
40
from .activation import LeakyReLU  #DEFINE_ALIAS
41 42 43 44
from .activation import Sigmoid  #DEFINE_ALIAS
# from .activation import Softmax        #DEFINE_ALIAS
from .activation import LogSoftmax  #DEFINE_ALIAS
from .common import BilinearTensorProduct  #DEFINE_ALIAS
45
from .common import Bilinear  #DEFINE_ALIAS
46
from .common import Pool2D  #DEFINE_ALIAS
C
ceci3 已提交
47
from .common import Pad2D  #DEFINE_ALIAS
L
littletomatodonkey 已提交
48 49 50 51 52 53 54 55 56 57
from .common import ReflectionPad1d  #DEFINE_ALIAS
from .common import ReplicationPad1d  #DEFINE_ALIAS
from .common import ConstantPad1d  #DEFINE_ALIAS
from .common import ReflectionPad2d  #DEFINE_ALIAS
from .common import ReplicationPad2d  #DEFINE_ALIAS
from .common import ConstantPad2d  #DEFINE_ALIAS
from .common import ZeroPad2d  #DEFINE_ALIAS
from .common import ReplicationPad3d  #DEFINE_ALIAS
from .common import ConstantPad3d  #DEFINE_ALIAS
from .common import CosineSimilarity  #DEFINE_ALIAS
58 59
from .common import Embedding  #DEFINE_ALIAS
from .common import Linear  #DEFINE_ALIAS
60
from .common import Flatten  #DEFINE_ALIAS
61
from .common import Upsample  #DEFINE_ALIAS
X
xiaoting 已提交
62 63
from .common import UpsamplingNearest2d  #DEFINE_ALIAS
from .common import UpsamplingBilinear2d  #DEFINE_ALIAS
64
from .common import Dropout  #DEFINE_ALIAS
65 66
from .common import Dropout2d  #DEFINE_ALIAS
from .common import Dropout3d  #DEFINE_ALIAS
67
from .common import AlphaDropout  #DEFINE_ALIAS
68 69 70
from .pooling import AvgPool1d  #DEFINE_ALIAS
from .pooling import AvgPool2d  #DEFINE_ALIAS
from .pooling import AvgPool3d  #DEFINE_ALIAS
71 72
from .pooling import MaxPool1d  #DEFINE_ALIAS
from .pooling import MaxPool2d  #DEFINE_ALIAS
73
from .pooling import MaxPool3d  #DEFINE_ALIAS
74 75 76 77 78 79
from .pooling import AdaptiveAvgPool1d  #DEFINE_ALIAS
from .pooling import AdaptiveAvgPool2d  #DEFINE_ALIAS
from .pooling import AdaptiveAvgPool3d  #DEFINE_ALIAS
from .pooling import AdaptiveMaxPool1d  #DEFINE_ALIAS
from .pooling import AdaptiveMaxPool2d  #DEFINE_ALIAS
from .pooling import AdaptiveMaxPool3d  #DEFINE_ALIAS
W
whs 已提交
80
from .conv import Conv1d  #DEFINE_ALIAS
81 82
from .conv import Conv2d  #DEFINE_ALIAS
from .conv import Conv3d  #DEFINE_ALIAS
83
from .conv import ConvTranspose1d  #DEFINE_ALIAS
L
LielinJiang 已提交
84 85
from .conv import ConvTranspose2d  #DEFINE_ALIAS
from .conv import ConvTranspose3d  #DEFINE_ALIAS
86 87 88 89
# from .conv import TreeConv        #DEFINE_ALIAS
# from .conv import Conv1D        #DEFINE_ALIAS
from .extension import RowConv  #DEFINE_ALIAS
# from .loss import NCELoss        #DEFINE_ALIAS
90
from .loss import BCEWithLogitsLoss  #DEFINE_ALIAS
91 92 93 94 95
from .loss import CrossEntropyLoss  #DEFINE_ALIAS
from .loss import MSELoss  #DEFINE_ALIAS
from .loss import L1Loss  #DEFINE_ALIAS
from .loss import NLLLoss  #DEFINE_ALIAS
from .loss import BCELoss  #DEFINE_ALIAS
96
from .loss import KLDivLoss  #DEFINE_ALIAS
97
from .loss import MarginRankingLoss  #DEFINE_ALIAS
98
from .loss import CTCLoss  #DEFINE_ALIAS
99
from .loss import SmoothL1Loss  #DEFINE_ALIAS
100
from .norm import BatchNorm  #DEFINE_ALIAS
C
ceci3 已提交
101
from .norm import SyncBatchNorm  #DEFINE_ALIAS
102 103 104 105 106 107 108
from .norm import GroupNorm  #DEFINE_ALIAS
from .norm import LayerNorm  #DEFINE_ALIAS
from .norm import SpectralNorm  #DEFINE_ALIAS
from .norm import InstanceNorm  #DEFINE_ALIAS
# from .rnn import RNNCell        #DEFINE_ALIAS
# from .rnn import GRUCell        #DEFINE_ALIAS
# from .rnn import LSTMCell        #DEFINE_ALIAS
R
ruri 已提交
109 110

from .vision import PixelShuffle  #DEFINE_ALIAS
111
from .distance import PairwiseDistance  #DEFINE_ALIAS