layer_types.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_METHODS_ANN_LAYER_LAYER_TYPES_HPP
13 #define MLPACK_METHODS_ANN_LAYER_LAYER_TYPES_HPP
14 
15 #include <boost/variant.hpp>
16 
17 // Layer modules.
43 
44 // Convolution modules.
48 
49 // Loss function modules.
51 
52 namespace mlpack {
53 namespace ann {
54 
55 template<typename InputDataType, typename OutputDataType> class BatchNorm;
56 template<typename InputDataType, typename OutputDataType> class DropConnect;
57 template<typename InputDataType, typename OutputDataType> class Glimpse;
58 template<typename InputDataType, typename OutputDataType> class LayerNorm;
59 template<typename InputDataType, typename OutputDataType> class Linear;
60 template<typename InputDataType, typename OutputDataType> class LinearNoBias;
61 template<typename InputDataType, typename OutputDataType> class LSTM;
62 template<typename InputDataType, typename OutputDataType> class GRU;
63 template<typename InputDataType, typename OutputDataType> class FastLSTM;
64 template<typename InputDataType, typename OutputDataType> class VRClassReward;
65 template<typename InputDataType, typename OutputDataType> class Concatenate;
66 
67 template<typename InputDataType,
68  typename OutputDataType
69 >
71 
72 template<typename InputDataType,
73  typename OutputDataType,
74  typename... CustomLayers
75 >
76 class AddMerge;
77 
78 template<typename InputDataType,
79  typename OutputDataType,
80  bool residual,
81  typename... CustomLayers
82 >
83 class Sequential;
84 
85 template<typename InputDataType,
86  typename OutputDataType,
87  typename... CustomLayers
88 >
89 class Recurrent;
90 
91 template<typename InputDataType,
92  typename OutputDataType,
93  typename... CustomLayers
94 >
95 class Concat;
96 
97 template<
98  typename OutputLayerType,
99  typename InputDataType,
100  typename OutputDataType
101 >
102 class ConcatPerformance;
103 
104 template<
105  typename ForwardConvolutionRule,
106  typename BackwardConvolutionRule,
107  typename GradientConvolutionRule,
108  typename InputDataType,
109  typename OutputDataType
110 >
111 class Convolution;
112 
113 template<
114  typename ForwardConvolutionRule,
115  typename BackwardConvolutionRule,
116  typename GradientConvolutionRule,
117  typename InputDataType,
118  typename OutputDataType
119 >
121 
122 template<
123  typename ForwardConvolutionRule,
124  typename BackwardConvolutionRule,
125  typename GradientConvolutionRule,
126  typename InputDataType,
127  typename OutputDataType
128 >
129 class AtrousConvolution;
130 
131 template<
132  typename InputDataType,
133  typename OutputDataType
134 >
136 
137 template<typename InputDataType,
138  typename OutputDataType,
139  typename... CustomLayers
140 >
142 
143 template <typename... CustomLayers>
144 using LayerTypes = boost::variant<
150  arma::mat, arma::mat>*,
161  arma::mat, arma::mat>*,
164  NaiveConvolution<FullConvolution>,
165  NaiveConvolution<ValidConvolution>, arma::mat, arma::mat>*,
167  NaiveConvolution<FullConvolution>,
168  NaiveConvolution<ValidConvolution>, arma::mat, arma::mat>*,
202  CustomLayers*...
203 >;
204 
205 } // namespace ann
206 } // namespace mlpack
207 
208 #endif
Implementation of the variance reduced classification reinforcement layer.
Definition: layer_types.hpp:64
Implementation of the Add module class.
Definition: add.hpp:34
Implementation of the Concatenate module class.
Definition: concatenate.hpp:36
boost::variant< Add< arma::mat, arma::mat > *, AddMerge< arma::mat, arma::mat > *, AtrousConvolution< NaiveConvolution< ValidConvolution >, NaiveConvolution< FullConvolution >, NaiveConvolution< ValidConvolution >, arma::mat, arma::mat > *, BaseLayer< LogisticFunction, arma::mat, arma::mat > *, BaseLayer< IdentityFunction, arma::mat, arma::mat > *, BaseLayer< TanhFunction, arma::mat, arma::mat > *, BaseLayer< RectifierFunction, arma::mat, arma::mat > *, BaseLayer< SoftplusFunction, arma::mat, arma::mat > *, BatchNorm< arma::mat, arma::mat > *, BilinearInterpolation< arma::mat, arma::mat > *, Concat< arma::mat, arma::mat > *, Concatenate< arma::mat, arma::mat > *, ConcatPerformance< NegativeLogLikelihood< arma::mat, arma::mat >, arma::mat, arma::mat > *, Constant< arma::mat, arma::mat > *, Convolution< NaiveConvolution< ValidConvolution >, NaiveConvolution< FullConvolution >, NaiveConvolution< ValidConvolution >, arma::mat, arma::mat > *, TransposedConvolution< NaiveConvolution< ValidConvolution >, NaiveConvolution< FullConvolution >, NaiveConvolution< ValidConvolution >, arma::mat, arma::mat > *, DropConnect< arma::mat, arma::mat > *, Dropout< arma::mat, arma::mat > *, AlphaDropout< arma::mat, arma::mat > *, ELU< arma::mat, arma::mat > *, FlexibleReLU< arma::mat, arma::mat > *, Glimpse< arma::mat, arma::mat > *, HardTanH< arma::mat, arma::mat > *, Join< arma::mat, arma::mat > *, LayerNorm< arma::mat, arma::mat > *, LeakyReLU< arma::mat, arma::mat > *, CReLU< arma::mat, arma::mat > *, Linear< arma::mat, arma::mat > *, LinearNoBias< arma::mat, arma::mat > *, LogSoftMax< arma::mat, arma::mat > *, Lookup< arma::mat, arma::mat > *, LSTM< arma::mat, arma::mat > *, GRU< arma::mat, arma::mat > *, FastLSTM< arma::mat, arma::mat > *, MaxPooling< arma::mat, arma::mat > *, MeanPooling< arma::mat, arma::mat > *, MultiplyConstant< arma::mat, arma::mat > *, MultiplyMerge< arma::mat, arma::mat > *, NegativeLogLikelihood< arma::mat, arma::mat > *, PReLU< arma::mat, arma::mat > *, Recurrent< arma::mat, arma::mat > *, RecurrentAttention< arma::mat, arma::mat > *, ReinforceNormal< arma::mat, arma::mat > *, Reparametrization< arma::mat, arma::mat > *, Select< arma::mat, arma::mat > *, Sequential< arma::mat, arma::mat, false > *, Sequential< arma::mat, arma::mat, true > *, Subview< arma::mat, arma::mat > *, VRClassReward< arma::mat, arma::mat > *, CustomLayers *... > LayerTypes
Implementation of the log softmax layer.
Definition: log_softmax.hpp:36
Implementation of the AddMerge module class.
Definition: add_merge.hpp:42
.hpp
Definition: add_to_po.hpp:21
The FlexibleReLU activation function, defined by.
Implementation of the Transposed Convolution class.
Implementation of the reinforce normal layer.
Implementation of the Linear layer class.
Definition: layer_types.hpp:59
The LeakyReLU activation function, defined by.
Definition: leaky_relu.hpp:44
This class implements the Recurrent Model for Visual Attention, using a variety of possible layer imp...
Implementation of the Convolution class.
Definition: convolution.hpp:46
Implementation of the MeanPooling.
Implementation of the Reparametrization layer class.
Definition: layer_types.hpp:70
Implementation of the Join module class.
Definition: join.hpp:33
Implementation of the concat performance class.
The Hard Tanh activation function, defined by.
Definition: hard_tanh.hpp:49
The select module selects the specified column from a given input matrix.
Definition: select.hpp:32
Implementation of the negative log likelihood layer.
The PReLU activation function, defined by (where alpha is trainable)
Implementation of the base layer.
Definition: base_layer.hpp:49
Implementation of the Concat class.
Definition: concat.hpp:45
Implementation of the LSTM module class.
Definition: layer_types.hpp:61
Declaration of the Layer Normalization class.
Definition: layer_norm.hpp:65
Implementation of the Lookup class.
Definition: lookup.hpp:35
Implementation of the subview layer.
Definition: subview.hpp:34
Implementation of the MultiplyMerge module class.
Implementation of the LinearNoBias class.
Definition: layer_types.hpp:60
A concatenated ReLU has two outputs, one ReLU and one negative ReLU, concatenated together...
Definition: c_relu.hpp:49
Computes the two-dimensional convolution.
An implementation of a gru network layer.
Definition: gru.hpp:57
The dropout layer is a regularizer that randomly with probability &#39;ratio&#39; sets input values to zero a...
Definition: dropout.hpp:52
The glimpse layer returns a retina-like representation (down-scaled cropped images) of increasing sca...
Definition: glimpse.hpp:87
The DropConnect layer is a regularizer that randomly with probability ratio sets the connection value...
Definition: dropconnect.hpp:62
Implementation of the multiply constant layer.
The alpha - dropout layer is a regularizer that randomly with probability &#39;ratio&#39; sets input values t...
Declaration of the Batch Normalization layer class.
Definition: batch_norm.hpp:56
Implementation of the RecurrentLayer class.
Definition: layer_types.hpp:89
Implementation of the Sequential class.
Definition: layer_types.hpp:83
Implementation of the constant layer.
Definition: constant.hpp:34
Implementation of the MaxPooling layer.
Definition: max_pooling.hpp:52
The ELU activation function, defined by.
Definition: elu.hpp:109
Definition and Implementation of the Bilinear Interpolation Layer.
An implementation of a faster version of the Fast LSTM network layer.
Definition: fast_lstm.hpp:61
Implementation of the Atrous Convolution class.