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);
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"
Implementation of the Concatenate module class.
OutputDataType & Concat()
Modify the delta.
OutputDataType const & Delta() const
Get the delta.
OutputDataType const & Parameters() const
Get the parameters.
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...
OutputDataType const & OutputParameter() const
Get the output parameter.
void serialize(Archive &, const unsigned int)
Serialize the layer.
Concatenate()
Create the Concatenate object using the specified number of output units.
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 & OutputParameter()
Modify the output parameter.
OutputDataType & Parameters()
Modify the parameters.
OutputDataType const & Concat() const
Get the concat matrix.
OutputDataType & Delta()
Modify the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.