13 #ifndef MLPACK_METHODS_ANN_LAYER_CONCATENATE_HPP 14 #define MLPACK_METHODS_ANN_LAYER_CONCATENATE_HPP 33 typename InputDataType = arma::mat,
34 typename OutputDataType = arma::mat
52 void Forward(
const arma::Mat<eT>&& input, arma::Mat<eT>&& output);
64 void Backward(
const arma::Mat<eT>&& ,
65 const arma::Mat<eT>&& gy,
69 OutputDataType
const&
Parameters()
const {
return weights; }
79 OutputDataType
const&
Delta()
const {
return delta; }
81 OutputDataType&
Delta() {
return delta; }
84 OutputDataType
const&
Concat()
const {
return concat; }
86 OutputDataType&
Concat() {
return concat; }
91 template<
typename Archive>
102 OutputDataType weights;
105 OutputDataType delta;
108 OutputDataType outputParameter;
111 OutputDataType concat;
118 #include "concatenate_impl.hpp" Concatenate()
Create the Concatenate object using the specified number of output units.
OutputDataType const & Parameters() const
Get the parameters.
void serialize(Archive &, const unsigned int)
Serialize the layer.
Implementation of the Concatenate module class.
void Backward(const arma::Mat< eT > &&, const arma::Mat< eT > &&gy, arma::Mat< eT > &&g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
OutputDataType const & OutputParameter() const
Get the output parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & Parameters()
Modify the parameters.
OutputDataType const & Concat() const
Get the concat matrix.
OutputDataType & Concat()
Modify the delta.
OutputDataType & OutputParameter()
Modify the output parameter.
OutputDataType & Delta()
Modify the delta.
OutputDataType const & Delta() const
Get the delta.
void Forward(const arma::Mat< eT > &&input, arma::Mat< eT > &&output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...