gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
SigmoidLayer< TYPE > Class Template Reference

#include <NeuralNetwork.H>

Inheritance diagram for SigmoidLayer< TYPE >:
[legend]
Collaboration diagram for SigmoidLayer< TYPE >:
[legend]

Public Member Functions

 SigmoidLayer (int inputSize, int outputSize)
 
template<typename Derived >
 SigmoidLayer (const Eigen::MatrixBase< Derived > &weightsIn, const Eigen::MatrixBase< Derived > &biasIn)
 
virtual ~SigmoidLayer (void)
 Destructor. More...
 
virtual Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > & activate (const Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > &input)
 
- Public Member Functions inherited from NeuralLayer< TYPE >
 NeuralLayer (int inputSize, int outputSize)
 
template<typename Derived >
 NeuralLayer (const Eigen::MatrixBase< Derived > &weightsIn, const Eigen::MatrixBase< Derived > &biasIn)
 
virtual ~NeuralLayer (void)
 Destructor. More...
 
int inputSize (void)
 
int outputSize (void)
 

Additional Inherited Members

- Public Attributes inherited from NeuralLayer< TYPE >
Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > output
 The output from this layer. More...
 
- Protected Attributes inherited from NeuralLayer< TYPE >
Eigen::Matrix< TYPE, Eigen::Dynamic, Eigen::Dynamic > weights
 The neural weights for this layer. More...
 
Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > bias
 The biases for this layer. More...
 

Detailed Description

template<typename TYPE>
class SigmoidLayer< TYPE >

Implements a neural layer with a sigmoid activation function

Template Parameters
TYPEthe precision of the data to use, e.g. float, double
Examples:
NeuralNetworkFnTest.C, and NeuralNetworkTest.C.

Definition at line 93 of file NeuralNetwork.H.

Constructor & Destructor Documentation

◆ SigmoidLayer() [1/2]

template<typename TYPE >
SigmoidLayer< TYPE >::SigmoidLayer ( int  inputSize,
int  outputSize 
)
inline

Generate a neural layer of particular size

Parameters
inputSizeThe number of the inputs
outputSizeThe number of outputs

Definition at line 99 of file NeuralNetwork.H.

◆ SigmoidLayer() [2/2]

template<typename TYPE >
template<typename Derived >
SigmoidLayer< TYPE >::SigmoidLayer ( const Eigen::MatrixBase< Derived > &  weightsIn,
const Eigen::MatrixBase< Derived > &  biasIn 
)
inline

Generate a neural layer of particular size providing the weights

Parameters
weightsInThe weights to set
biasInThe biases to set
Template Parameters
Derivedis used by Eigen's Curiously recurring template pattern (CRTP)

Definition at line 108 of file NeuralNetwork.H.

◆ ~SigmoidLayer()

template<typename TYPE >
virtual SigmoidLayer< TYPE >::~SigmoidLayer ( void  )
inlinevirtual

Destructor.

Definition at line 112 of file NeuralNetwork.H.

Member Function Documentation

◆ activate()

template<typename TYPE >
virtual Eigen::Matrix<TYPE, Eigen::Dynamic, 1>& SigmoidLayer< TYPE >::activate ( const Eigen::Matrix< TYPE, Eigen::Dynamic, 1 > &  input)
inlinevirtual

The sigmoidal activation function Evaluate the neural layer using the sigmoid as the activation function

Parameters
inputThe input to this layer
Returns
The result of the layer after processing the input

Reimplemented from NeuralLayer< TYPE >.

Definition at line 119 of file NeuralNetwork.H.

Here is the call graph for this function:

The documentation for this class was generated from the following file:
gtkIOStream: SigmoidLayer< TYPE > Class Template Reference
GTK+ IOStream  Beta