|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669 |
- API - Layers
- ============
-
- .. automodule:: tensorlayer.layers
-
- .. -----------------------------------------------------------
- .. Layer List
- .. -----------------------------------------------------------
-
- Layer list
- ----------
-
- .. autosummary::
-
- Module
-
- SequentialLayer
-
- Input
-
- OneHot
- Word2vecEmbedding
- Embedding
- AverageEmbedding
-
- Dense
- Dropout
- GaussianNoise
- DropconnectDense
-
- UpSampling2d
- DownSampling2d
-
- Conv1d
- Conv2d
- Conv3d
- DeConv2d
- DeConv3d
- DepthwiseConv2d
- SeparableConv1d
- SeparableConv2d
- DeformableConv2d
- GroupConv2d
-
- PadLayer
- PoolLayer
- ZeroPad1d
- ZeroPad2d
- ZeroPad3d
- MaxPool1d
- MeanPool1d
- MaxPool2d
- MeanPool2d
- MaxPool3d
- MeanPool3d
- GlobalMaxPool1d
- GlobalMeanPool1d
- GlobalMaxPool2d
- GlobalMeanPool2d
- GlobalMaxPool3d
- GlobalMeanPool3d
- CornerPool2d
-
- SubpixelConv1d
- SubpixelConv2d
-
- SpatialTransformer2dAffine
- transformer
- batch_transformer
-
- BatchNorm
- BatchNorm1d
- BatchNorm2d
- BatchNorm3d
-
- RNN
- SimpleRNN
- GRURNN
- LSTMRNN
- BiRNN
-
- retrieve_seq_length_op
- retrieve_seq_length_op2
- retrieve_seq_length_op3
- target_mask_op
-
- Flatten
- Reshape
- Transpose
- Shuffle
-
- Lambda
-
- Concat
- Elementwise
- ElementwiseLambda
-
- ExpandDims
- Tile
-
- Stack
- UnStack
-
- Sign
- Scale
- BinaryDense
- BinaryConv2d
- TernaryDense
- TernaryConv2d
- DorefaDense
- DorefaConv2d
-
- PRelu
- PRelu6
- PTRelu6
-
- flatten_reshape
- initialize_rnn_state
- list_remove_repeat
-
- .. -----------------------------------------------------------
- .. Basic Layers
- .. -----------------------------------------------------------
-
- Base Layer
- -----------
-
- Module
- ^^^^^^^^^^^^^^^^
- .. autoclass:: Module
-
- Sequential Layer
- ^^^^^^^^^^^^^^^^
- .. autoclass:: SequentialLayer
-
- .. -----------------------------------------------------------
- .. Input Layer
- .. -----------------------------------------------------------
-
- Input Layers
- ---------------
-
- Input Layer
- ^^^^^^^^^^^^^^^^
- .. autofunction:: Input
-
- .. -----------------------------------------------------------
- .. Embedding Layers
- .. -----------------------------------------------------------
-
-
- One-hot Layer
- ^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: OneHot
-
- Word2Vec Embedding Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Word2vecEmbedding
-
- Embedding Layer
- ^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Embedding
-
- Average Embedding Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: AverageEmbedding
-
- .. -----------------------------------------------------------
- .. Activation Layers
- .. -----------------------------------------------------------
-
-
- Activation Layers
- ---------------------------
-
- PReLU Layer
- ^^^^^^^^^^^^^^^^^
- .. autoclass:: PRelu
-
-
- PReLU6 Layer
- ^^^^^^^^^^^^^^^^^^
- .. autoclass:: PRelu6
-
-
- PTReLU6 Layer
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: PTRelu6
-
-
- .. -----------------------------------------------------------
- .. Convolutional Layers
- .. -----------------------------------------------------------
-
- Convolutional Layers
- ---------------------
-
- Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- Conv1d
- """""""""""""""""""""
- .. autoclass:: Conv1d
-
- Conv2d
- """""""""""""""""""""
- .. autoclass:: Conv2d
-
- Conv3d
- """""""""""""""""""""
- .. autoclass:: Conv3d
-
- Deconvolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- DeConv2d
- """""""""""""""""""""
- .. autoclass:: DeConv2d
-
- DeConv3d
- """""""""""""""""""""
- .. autoclass:: DeConv3d
-
-
- Deformable Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- DeformableConv2d
- """""""""""""""""""""
- .. autoclass:: DeformableConv2d
-
-
- Depthwise Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- DepthwiseConv2d
- """""""""""""""""""""
- .. autoclass:: DepthwiseConv2d
-
-
- Group Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- GroupConv2d
- """""""""""""""""""""
- .. autoclass:: GroupConv2d
-
-
- Separable Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- SeparableConv1d
- """""""""""""""""""""
- .. autoclass:: SeparableConv1d
-
- SeparableConv2d
- """""""""""""""""""""
- .. autoclass:: SeparableConv2d
-
-
- SubPixel Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- SubpixelConv1d
- """""""""""""""""""""
- .. autoclass:: SubpixelConv1d
-
- SubpixelConv2d
- """""""""""""""""""""
- .. autoclass:: SubpixelConv2d
-
-
- .. -----------------------------------------------------------
- .. Dense Layers
- .. -----------------------------------------------------------
-
- Dense Layers
- -------------
-
- Dense Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Dense
-
- Drop Connect Dense Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: DropconnectDense
-
-
- .. -----------------------------------------------------------
- .. Dropout Layer
- .. -----------------------------------------------------------
-
- Dropout Layers
- -------------------
- .. autoclass:: Dropout
-
- .. -----------------------------------------------------------
- .. Extend Layers
- .. -----------------------------------------------------------
-
- Extend Layers
- -------------------
-
- Expand Dims Layer
- ^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: ExpandDims
-
-
- Tile layer
- ^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Tile
-
- .. -----------------------------------------------------------
- .. Image Resampling Layers
- .. -----------------------------------------------------------
-
- Image Resampling Layers
- -------------------------
-
- 2D UpSampling
- ^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: UpSampling2d
-
- 2D DownSampling
- ^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: DownSampling2d
-
- .. -----------------------------------------------------------
- .. Lambda Layer
- .. -----------------------------------------------------------
-
- Lambda Layers
- ---------------
-
- Lambda Layer
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Lambda
-
- ElementWise Lambda Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: ElementwiseLambda
-
- .. -----------------------------------------------------------
- .. Merge Layer
- .. -----------------------------------------------------------
-
- Merge Layers
- ---------------
-
- Concat Layer
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Concat
-
- ElementWise Layer
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: Elementwise
-
- .. -----------------------------------------------------------
- .. Noise Layers
- .. -----------------------------------------------------------
-
- Noise Layer
- ---------------
- .. autoclass:: GaussianNoise
-
- .. -----------------------------------------------------------
- .. Normalization Layers
- .. -----------------------------------------------------------
-
- Normalization Layers
- --------------------
-
- Batch Normalization
- ^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: BatchNorm
-
- Batch Normalization 1D
- ^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: BatchNorm1d
-
- Batch Normalization 2D
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: BatchNorm2d
-
- Batch Normalization 3D
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: BatchNorm3d
-
- .. -----------------------------------------------------------
- .. Padding Layers
- .. -----------------------------------------------------------
-
- Padding Layers
- ------------------------
-
- Pad Layer (Expert API)
- ^^^^^^^^^^^^^^^^^^^^^^^^^
- Padding layer for any modes.
-
- .. autoclass:: PadLayer
-
- 1D Zero padding
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: ZeroPad1d
-
- 2D Zero padding
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: ZeroPad2d
-
- 3D Zero padding
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: ZeroPad3d
-
- .. -----------------------------------------------------------
- .. Pooling Layers
- .. -----------------------------------------------------------
-
- Pooling Layers
- ------------------------
-
- Pool Layer (Expert API)
- ^^^^^^^^^^^^^^^^^^^^^^^^^
- Pooling layer for any dimensions and any pooling functions.
-
- .. autoclass:: PoolLayer
-
- 1D Max pooling
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: MaxPool1d
-
- 1D Mean pooling
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: MeanPool1d
-
- 2D Max pooling
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: MaxPool2d
-
- 2D Mean pooling
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: MeanPool2d
-
- 3D Max pooling
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: MaxPool3d
-
- 3D Mean pooling
- ^^^^^^^^^^^^^^^^^^^
- .. autoclass:: MeanPool3d
-
- 1D Global Max pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: GlobalMaxPool1d
-
- 1D Global Mean pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: GlobalMeanPool1d
-
- 2D Global Max pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: GlobalMaxPool2d
-
- 2D Global Mean pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: GlobalMeanPool2d
-
- 3D Global Max pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: GlobalMaxPool3d
-
- 3D Global Mean pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: GlobalMeanPool3d
-
- 2D Corner pooling
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: CornerPool2d
-
- .. -----------------------------------------------------------
- .. Quantized Layers
- .. -----------------------------------------------------------
-
- Quantized Nets
- ------------------
-
- This is an experimental API package for building Quantized Neural Networks. We are using matrix multiplication rather than add-minus and bit-count operation at the moment. Therefore, these APIs would not speed up the inferencing, for production, you can train model via TensorLayer and deploy the model into other customized C/C++ implementation (We probably provide users an extra C/C++ binary net framework that can load model from TensorLayer).
-
- Note that, these experimental APIs can be changed in the future.
-
-
- Sign
- ^^^^^^^^^^^^^^
- .. autoclass:: Sign
-
- Scale
- ^^^^^^^^^^^^^^
- .. autoclass:: Scale
-
- Binary Dense Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: BinaryDense
-
- Binary (De)Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- BinaryConv2d
- """""""""""""""""""""
- .. autoclass:: BinaryConv2d
-
- Ternary Dense Layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- TernaryDense
- """""""""""""""""""""
- .. autoclass:: TernaryDense
-
- Ternary Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- TernaryConv2d
- """""""""""""""""""""
- .. autoclass:: TernaryConv2d
-
- DoReFa Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- DorefaConv2d
- """""""""""""""""""""
- .. autoclass:: DorefaConv2d
-
- DoReFa Convolutions
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- DorefaConv2d
- """""""""""""""""""""
- .. autoclass:: DorefaConv2d
-
-
- .. -----------------------------------------------------------
- .. Recurrent Layers
- .. -----------------------------------------------------------
-
- Recurrent Layers
- ---------------------
-
- Common Recurrent layer
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- All recurrent layers can implement any type of RNN cell by feeding different cell function (LSTM, GRU etc).
-
- RNN layer
- """"""""""""""""""""""""""
- .. autoclass:: RNN
-
- RNN layer with Simple RNN Cell
- """"""""""""""""""""""""""""""""""
- .. autoclass:: SimpleRNN
-
- RNN layer with GRU Cell
- """"""""""""""""""""""""""""""""""
- .. autoclass:: GRURNN
-
- RNN layer with LSTM Cell
- """"""""""""""""""""""""""""""""""
- .. autoclass:: LSTMRNN
-
- Bidirectional layer
- """""""""""""""""""""""""""""""""
- .. autoclass:: BiRNN
-
- Advanced Ops for Dynamic RNN
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- These operations usually be used inside Dynamic RNN layer, they can
- compute the sequence lengths for different situation and get the last RNN outputs by indexing.
-
- Compute Sequence length 1
- """"""""""""""""""""""""""
- .. autofunction:: retrieve_seq_length_op
-
- Compute Sequence length 2
- """""""""""""""""""""""""""""
- .. autofunction:: retrieve_seq_length_op2
-
- Compute Sequence length 3
- """"""""""""""""""""""""""""
- .. autofunction:: retrieve_seq_length_op3
-
- Compute mask of the target sequence
- """""""""""""""""""""""""""""""""""""""
- .. autofunction:: target_mask_op
-
-
-
- .. -----------------------------------------------------------
- .. Shape Layers
- .. -----------------------------------------------------------
-
- Shape Layers
- ------------
-
- Flatten Layer
- ^^^^^^^^^^^^^^^
- .. autoclass:: Flatten
-
- Reshape Layer
- ^^^^^^^^^^^^^^^
- .. autoclass:: Reshape
-
- Transpose Layer
- ^^^^^^^^^^^^^^^^^
- .. autoclass:: Transpose
-
- Shuffle Layer
- ^^^^^^^^^^^^^^^^^
- .. autoclass:: Shuffle
-
- .. -----------------------------------------------------------
- .. Spatial Transformer Layers
- .. -----------------------------------------------------------
-
- Spatial Transformer
- -----------------------
-
- 2D Affine Transformation
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autoclass:: SpatialTransformer2dAffine
-
- 2D Affine Transformation function
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autofunction:: transformer
-
- Batch 2D Affine Transformation function
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autofunction:: batch_transformer
-
- .. -----------------------------------------------------------
- .. Stack Layers
- .. -----------------------------------------------------------
-
- Stack Layer
- -------------
-
- Stack Layer
- ^^^^^^^^^^^^^^
- .. autoclass:: Stack
-
- Unstack Layer
- ^^^^^^^^^^^^^^^
- .. autoclass:: UnStack
-
-
- .. -----------------------------------------------------------
- .. Helper Functions
- .. -----------------------------------------------------------
-
- Helper Functions
- ------------------------
-
- Flatten tensor
- ^^^^^^^^^^^^^^^^^
- .. autofunction:: flatten_reshape
-
- Initialize RNN state
- ^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autofunction:: initialize_rnn_state
-
- Remove repeated items in a list
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- .. autofunction:: list_remove_repeat
-
|