#include <shark/Models/FFNet.h>
#include <shark/Models/Autoencoder.h>
#include <shark/Models/ImpulseNoiseModel.h>
#include <shark/Models/ConcatenatedModel.h>
#include <shark/ObjectiveFunctions/ErrorFunction.h>
#include <shark/ObjectiveFunctions/Loss/SquaredLoss.h>
#include <shark/ObjectiveFunctions/Loss/CrossEntropy.h>
#include <shark/ObjectiveFunctions/Loss/ZeroOneLoss.h>
#include <shark/ObjectiveFunctions/Regularizer.h>
#include <shark/Algorithms/GradientDescent/SteepestDescent.h>
#include <shark/Algorithms/GradientDescent/Rprop.h>
Go to the source code of this file.
Typedefs | |
typedef Autoencoder< RectifierNeuron, LinearNeuron > | AutoencoderModel |
typedef FFNet< RectifierNeuron, LinearNeuron > | Network |
Functions | |
LabeledData< RealVector, unsigned int > | createProblem () |
template<class AutoencoderModel > | |
AutoencoderModel | trainAutoencoderModel (UnlabeledData< RealVector > const &data, std::size_t numHidden, double regularisation, double noiseStrength, std::size_t iterations) |
Network | unsupervisedPreTraining (UnlabeledData< RealVector > const &data, std::size_t numHidden1, std::size_t numHidden2, std::size_t numOutputs, double regularisation, double noiseStrength, std::size_t iterations) |
int | main () |
Definition at line 82 of file DeepNetworkTraining.cpp.
typedef FFNet<RectifierNeuron,LinearNeuron> Network |
Definition at line 83 of file DeepNetworkTraining.cpp.
LabeledData<RealVector,unsigned int> createProblem | ( | ) |
Definition at line 20 of file DeepNetworkTraining.cpp.
References shark::coinToss(), shark::createLabeledDataFromRange(), and shark::blas::subrange().
Referenced by main().
int main | ( | ) |
Definition at line 118 of file DeepNetworkTraining.cpp.
References createProblem(), shark::ZeroOneLoss< unsigned int, RealVector >::eval(), shark::IRpropPlusFull::init(), shark::LabeledData< InputT, LabelT >::inputs(), shark::LabeledData< InputT, LabelT >::labels(), shark::numberOfClasses(), shark::LabeledData< InputT, LabelT >::numberOfElements(), shark::ErrorFunction::numberOfVariables(), shark::ResultSet< SearchPointT, ResultT >::point, shark::FFNet< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::ErrorFunction::setRegularizer(), shark::LabeledData< InputT, LabelT >::shuffle(), shark::AbstractSingleObjectiveOptimizer< PointType >::solution(), shark::splitAtElement(), shark::IRpropPlusFull::step(), unsupervisedPreTraining(), and shark::ResultSet< SearchPointT, ResultT >::value.
AutoencoderModel trainAutoencoderModel | ( | UnlabeledData< RealVector > const & | data, |
std::size_t | numHidden, | ||
double | regularisation, | ||
double | noiseStrength, | ||
std::size_t | iterations | ||
) |
Definition at line 50 of file DeepNetworkTraining.cpp.
References shark::dataDimension(), shark::IRpropPlusFull::init(), shark::initRandomUniform(), shark::ConcatenatedModel< InputType, OutputType >::name(), noise, shark::ErrorFunction::numberOfVariables(), shark::ResultSet< SearchPointT, ResultT >::point, shark::ConcatenatedModel< InputType, OutputType >::setParameterVector(), shark::ErrorFunction::setRegularizer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::setStructure(), shark::AbstractSingleObjectiveOptimizer< PointType >::solution(), shark::IRpropPlusFull::step(), and shark::ResultSet< SearchPointT, ResultT >::value.
Network unsupervisedPreTraining | ( | UnlabeledData< RealVector > const & | data, |
std::size_t | numHidden1, | ||
std::size_t | numHidden2, | ||
std::size_t | numOutputs, | ||
double | regularisation, | ||
double | noiseStrength, | ||
std::size_t | iterations | ||
) |
Definition at line 86 of file DeepNetworkTraining.cpp.
References shark::dataDimension(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::encoderMatrix(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::hiddenBias(), shark::initRandomNormal(), and shark::FFNet< HiddenNeuron, OutputNeuron >::setStructure().
Referenced by main().