__init__.py 4.8 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
# including layers, linear, conv, rnn etc.
17

18
from .layer import norm
L
Li Fuchen 已提交
19
from .functional import extension
20
from .layer import common
21 22 23

__all__ = []
__all__ += norm.__all__
L
Li Fuchen 已提交
24
__all__ += extension.__all__
25
__all__ += common.__all__
26

27
# TODO: define alias in nn directory
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
# from .clip import ErrorClipByValue        #DEFINE_ALIAS
from .clip import GradientClipByGlobalNorm  #DEFINE_ALIAS
from .clip import GradientClipByNorm  #DEFINE_ALIAS
from .clip import GradientClipByValue  #DEFINE_ALIAS
# from .clip import set_gradient_clip        #DEFINE_ALIAS
from .clip import clip  #DEFINE_ALIAS
# from .clip import clip_by_norm        #DEFINE_ALIAS
from .control_flow import case  #DEFINE_ALIAS
from .control_flow import cond  #DEFINE_ALIAS
# from .control_flow import DynamicRNN        #DEFINE_ALIAS
# from .control_flow import StaticRNN        #DEFINE_ALIAS
# from .control_flow import switch_case        #DEFINE_ALIAS
from .control_flow import while_loop  #DEFINE_ALIAS
# from .control_flow import rnn        #DEFINE_ALIAS
# from .decode import BeamSearchDecoder        #DEFINE_ALIAS
# from .decode import Decoder        #DEFINE_ALIAS
from .decode import beam_search  #DEFINE_ALIAS
from .decode import beam_search_decode  #DEFINE_ALIAS
# from .decode import crf_decoding        #DEFINE_ALIAS
# from .decode import ctc_greedy_decoder        #DEFINE_ALIAS
# from .decode import dynamic_decode        #DEFINE_ALIAS
# from .decode import gather_tree        #DEFINE_ALIAS
# from .initalizer import Bilinear        #DEFINE_ALIAS
# from .initalizer import Constant        #DEFINE_ALIAS
# from .initalizer import MSRA        #DEFINE_ALIAS
# from .initalizer import Normal        #DEFINE_ALIAS
# from .initalizer import TruncatedNormal        #DEFINE_ALIAS
# from .initalizer import Uniform        #DEFINE_ALIAS
# from .initalizer import Xavier        #DEFINE_ALIAS
from .input import data  #DEFINE_ALIAS
# from .input import Input        #DEFINE_ALIAS
# from .layer.activation import PReLU        #DEFINE_ALIAS
from .layer.activation import ReLU  #DEFINE_ALIAS
from .layer.activation import Sigmoid  #DEFINE_ALIAS
# from .layer.activation import Softmax        #DEFINE_ALIAS
from .layer.activation import LogSoftmax  #DEFINE_ALIAS
from .layer.activation import HSigmoid  #DEFINE_ALIAS
from .layer.common import BilinearTensorProduct  #DEFINE_ALIAS
from .layer.common import Pool2D  #DEFINE_ALIAS
from .layer.common import Embedding  #DEFINE_ALIAS
from .layer.common import Linear  #DEFINE_ALIAS
69
from .layer.common import UpSample  #DEFINE_ALIAS
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
from .layer.conv import Conv2D  #DEFINE_ALIAS
from .layer.conv import Conv2DTranspose  #DEFINE_ALIAS
from .layer.conv import Conv3D  #DEFINE_ALIAS
from .layer.conv import Conv3DTranspose  #DEFINE_ALIAS
# from .layer.conv import TreeConv        #DEFINE_ALIAS
# from .layer.conv import Conv1D        #DEFINE_ALIAS
from .layer.extension import RowConv  #DEFINE_ALIAS
# from .layer.learning_rate import CosineDecay        #DEFINE_ALIAS
# from .layer.learning_rate import ExponentialDecay        #DEFINE_ALIAS
# from .layer.learning_rate import InverseTimeDecay        #DEFINE_ALIAS
# from .layer.learning_rate import NaturalExpDecay        #DEFINE_ALIAS
# from .layer.learning_rate import NoamDecay        #DEFINE_ALIAS
# from .layer.learning_rate import PiecewiseDecay        #DEFINE_ALIAS
# from .layer.learning_rate import PolynomialDecay        #DEFINE_ALIAS
# from .layer.loss import NCELoss        #DEFINE_ALIAS
85
from .layer.loss import CrossEntropyLoss  #DEFINE_ALIAS
86
from .layer.loss import MSELoss  #DEFINE_ALIAS
L
Leo Chen 已提交
87
from .layer.loss import L1Loss  #DEFINE_ALIAS
88
from .layer.loss import NLLLoss  #DEFINE_ALIAS
C
ceci3 已提交
89
from .layer.loss import BCELoss  #DEFINE_ALIAS
90 91 92 93
from .layer.norm import BatchNorm  #DEFINE_ALIAS
from .layer.norm import GroupNorm  #DEFINE_ALIAS
from .layer.norm import LayerNorm  #DEFINE_ALIAS
from .layer.norm import SpectralNorm  #DEFINE_ALIAS
94
from .layer.norm import InstanceNorm  #DEFINE_ALIAS
95 96 97 98 99
# from .layer.rnn import RNNCell        #DEFINE_ALIAS
# from .layer.rnn import GRUCell        #DEFINE_ALIAS
# from .layer.rnn import LSTMCell        #DEFINE_ALIAS
from .layer import loss  #DEFINE_ALIAS
from .layer import conv  #DEFINE_ALIAS
100
from ..fluid.dygraph.layers import Layer  #DEFINE_ALIAS