nn and contrib.nn¶
Gluon provides a large number of build-in neural network layers in the following two modules:
|
Neural network layers. |
|
Contrib recurrent neural network module. |
We group all layers in these two modules according to their categories.
Blocks¶
Base class for all neural network layers and models. |
|
HybridBlock supports forwarding with both Symbol and NDArray. |
|
Construct block from symbol. |
Sequential containers¶
Stacks Blocks sequentially. |
|
Stacks HybridBlocks sequentially. |
Concurrent containers¶
Lays Block s concurrently. |
|
Lays HybridBlock s concurrently. |
Basic Layers¶
Just your regular densely-connected NN layer. |
|
Applies an activation function to input. |
|
Applies Dropout to the input. |
|
Flattens the input to two dimensional. |
|
Wraps an operator or an expression as a Block object. |
|
Wraps an operator or an expression as a HybridBlock object. |
Convolutional Layers¶
1D convolution layer (e.g. |
|
2D convolution layer (e.g. |
|
3D convolution layer (e.g. |
|
Transposed 1D convolution layer (sometimes called Deconvolution). |
|
Transposed 2D convolution layer (sometimes called Deconvolution). |
|
Transposed 3D convolution layer (sometimes called Deconvolution). |
Pooling Layers¶
Max pooling operation for one dimensional data. |
|
Max pooling operation for two dimensional (spatial) data. |
|
Max pooling operation for 3D data (spatial or spatio-temporal). |
|
Average pooling operation for temporal data. |
|
Average pooling operation for spatial data. |
|
Average pooling operation for 3D data (spatial or spatio-temporal). |
|
Gloabl max pooling operation for one dimensional (temporal) data. |
|
Global max pooling operation for two dimensional (spatial) data. |
|
Global max pooling operation for 3D data (spatial or spatio-temporal). |
|
Global average pooling operation for temporal data. |
|
Global average pooling operation for spatial data. |
|
Global average pooling operation for 3D data (spatial or spatio-temporal). |
|
Pads the input tensor using the reflection of the input boundary. |
Normalization Layers¶
Batch normalization layer (Ioffe and Szegedy, 2014). |
|
Applies instance normalization to the n-dimensional input array. |
|
Applies layer normalization to the n-dimensional input array. |
|
Cross-GPU Synchronized Batch normalization (SyncBN) |
Embedding Layers¶
Turns non-negative integers (indexes/tokens) into dense vectors of fixed size. |
|
Turns non-negative integers (indexes/tokens) into dense vectors of fixed size. |