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.
44 
45 // Convolution modules.
49 
50 // Regularizers.
52 
53 // Loss function modules.
55 
56 namespace mlpack {
57 namespace ann {
58 
59 template<typename InputDataType, typename OutputDataType> class BatchNorm;
60 template<typename InputDataType, typename OutputDataType> class DropConnect;
61 template<typename InputDataType, typename OutputDataType> class Glimpse;
62 template<typename InputDataType, typename OutputDataType> class LayerNorm;
63 template<typename InputDataType, typename OutputDataType> class LSTM;
64 template<typename InputDataType, typename OutputDataType> class GRU;
65 template<typename InputDataType, typename OutputDataType> class FastLSTM;
66 template<typename InputDataType, typename OutputDataType> class VRClassReward;
67 template<typename InputDataType, typename OutputDataType> class Concatenate;
68 template<typename InputDataType, typename OutputDataType> class Padding;
69 
70 template<typename InputDataType,
71  typename OutputDataType,
72  typename RegularizerType>
73 class Linear;
74 
75 template<typename InputDataType,
76  typename OutputDataType,
77  typename RegularizerType>
79 
80 template<typename InputDataType,
81  typename OutputDataType
82 >
84 
85 template<typename InputDataType,
86  typename OutputDataType
87 >
89 
90 template<typename InputDataType,
91  typename OutputDataType
92 >
94 
95 template<typename InputDataType,
96  typename OutputDataType,
97  typename... CustomLayers
98 >
99 class AddMerge;
100 
101 template<typename InputDataType,
102  typename OutputDataType,
103  bool residual,
104  typename... CustomLayers
105 >
107 
108 template<typename InputDataType,
109  typename OutputDataType,
110  typename... CustomLayers
111 >
112 class Highway;
113 
114 template<typename InputDataType,
115  typename OutputDataType,
116  typename... CustomLayers
117 >
118 class Recurrent;
119 
120 template<typename InputDataType,
121  typename OutputDataType,
122  typename... CustomLayers
123 >
124 class Concat;
125 
126 template<
127  typename OutputLayerType,
128  typename InputDataType,
129  typename OutputDataType
130 >
131 class ConcatPerformance;
132 
133 template<
134  typename ForwardConvolutionRule,
135  typename BackwardConvolutionRule,
136  typename GradientConvolutionRule,
137  typename InputDataType,
138  typename OutputDataType
139 >
140 class Convolution;
141 
142 template<
143  typename ForwardConvolutionRule,
144  typename BackwardConvolutionRule,
145  typename GradientConvolutionRule,
146  typename InputDataType,
147  typename OutputDataType
148 >
150 
151 template<
152  typename ForwardConvolutionRule,
153  typename BackwardConvolutionRule,
154  typename GradientConvolutionRule,
155  typename InputDataType,
156  typename OutputDataType
157 >
158 class AtrousConvolution;
159 
160 template<
161  typename InputDataType,
162  typename OutputDataType
163 >
165 
166 template<typename InputDataType,
167  typename OutputDataType,
168  typename... CustomLayers
169 >
171 
172 template <typename InputDataType,
173  typename OutputDataType,
174  typename... CustomLayers
175 >
177 
178 using MoreTypes = boost::variant<
190 >;
191 
192 template <typename... CustomLayers>
193 using LayerTypes = boost::variant<
199  arma::mat, arma::mat>*,
210  arma::mat, arma::mat>*,
213  NaiveConvolution<FullConvolution>,
214  NaiveConvolution<ValidConvolution>, arma::mat, arma::mat>*,
216  NaiveConvolution<FullConvolution>,
217  NaiveConvolution<ValidConvolution>, arma::mat, arma::mat>*,
245  MoreTypes,
246  CustomLayers*...
247 >;
248 
249 } // namespace ann
250 } // namespace mlpack
251 
252 #endif
boost::variant< 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 > *, VirtualBatchNorm< arma::mat, arma::mat > *, WeightNorm< arma::mat, arma::mat > *> MoreTypes
Implementation of the variance reduced classification reinforcement layer.
Definition: layer_types.hpp:66
Implementation of the Add module class.
Definition: add.hpp:34
Implementation of the Concatenate module class.
Definition: concatenate.hpp:36
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
Implementation of the Padding module class.
Definition: layer_types.hpp:68
Declaration of the VirtualBatchNorm layer class.
Definition: layer_types.hpp:83
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:73
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:47
Implementation of the MeanPooling.
Implementation of the Reparametrization layer class.
Definition: layer_types.hpp:93
Implementation of the Join module class.
Definition: join.hpp:33
Implementation of the concat performance class.
Declaration of the WeightNorm layer 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
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 > *, Highway< 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, NoRegularizer > *, LinearNoBias< arma::mat, arma::mat, NoRegularizer > *, 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 > *, MiniBatchDiscrimination< arma::mat, arma::mat > *, MultiplyConstant< arma::mat, arma::mat > *, MultiplyMerge< arma::mat, arma::mat > *, NegativeLogLikelihood< arma::mat, arma::mat > *, Padding< arma::mat, arma::mat > *, PReLU< arma::mat, arma::mat > *, MoreTypes, CustomLayers *... > LayerTypes
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 Highway layer.
Definition: highway.hpp:60
Implementation of the LSTM module class.
Definition: layer_types.hpp:63
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 MiniBatchDiscrimination layer.
Definition: layer_types.hpp:88
Implementation of the MultiplyMerge module class.
Implementation of the LinearNoBias class.
Definition: layer_types.hpp:78
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.
Implementation of the Sequential class.
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.