#include <shark/Data/Pgm.h>
#include <shark/Data/Csv.h>
#include <shark/Data/Statistics.h>
#include <shark/ObjectiveFunctions/SparseAutoencoderError.h>
#include <shark/Algorithms/GradientDescent/LBFGS.h>
#include <shark/ObjectiveFunctions/Loss/SquaredLoss.h>
#include <shark/ObjectiveFunctions/Regularizer.h>
#include <shark/Core/Timer.h>
Go to the source code of this file.
Functions | |
UnlabeledData< RealVector > | getSamples () |
void | initializeFFNet (Autoencoder< LogisticNeuron, LogisticNeuron > &model) |
int | main () |
Variables | |
const unsigned int | numsamples = 10000 |
const unsigned int | w = 512 |
const unsigned int | h = 512 |
const unsigned int | psize = 8 |
const unsigned int | numhidden = 25 |
const double | rho = 0.01 |
const double | beta = 6.0 |
const double | lambda = 0.0002 |
const unsigned int | maxIter = 400 |
UnlabeledData<RealVector> getSamples | ( | ) |
Definition at line 30 of file SparseAETutorial.cpp.
References shark::createDataFromRange(), shark::discrete(), shark::Data< Type >::elements(), h, shark::importCSV(), shark::mean(), shark::Data< Type >::numberOfElements(), numsamples, psize, shark::transform(), shark::variance(), and w.
Referenced by main().
void initializeFFNet | ( | Autoencoder< LogisticNeuron, LogisticNeuron > & | model | ) |
Definition at line 79 of file SparseAETutorial.cpp.
References shark::Autoencoder< HiddenNeuron, OutputNeuron >::inputSize(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::numberOfHiddenNeurons(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::numberOfParameters(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::outputSize(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), and shark::uni().
Referenced by main().
int main | ( | ) |
Definition at line 93 of file SparseAETutorial.cpp.
References beta, shark::Autoencoder< HiddenNeuron, OutputNeuron >::encoderMatrix(), shark::AbstractObjectiveFunction< PointType, ResultT >::evaluationCounter(), shark::exportFiltersToPGMGrid(), getSamples(), shark::AbstractLineSearchOptimizer::init(), initializeFFNet(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::inputSize(), lambda, shark::AbstractLineSearchOptimizer::lineSearch(), shark::LineSearch::lineSearchType(), maxIter, shark::Data< Type >::numberOfElements(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::numberOfHiddenNeurons(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::numberOfParameters(), shark::SparseAutoencoderError::numberOfVariables(), numhidden, shark::Autoencoder< HiddenNeuron, OutputNeuron >::outputSize(), psize, rho, shark::SparseAutoencoderError::setRegularizer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::setStructure(), shark::AbstractSingleObjectiveOptimizer< PointType >::solution(), shark::AbstractLineSearchOptimizer::step(), shark::Timer::stop(), and shark::ResultSet< SearchPointT, ResultT >::value.
const double beta = 6.0 |
Definition at line 24 of file SparseAETutorial.cpp.
Referenced by shark::annealedImportanceSampling(), shark::blas::applyHouseholderOnTheLeft(), shark::blas::applyHouseholderOnTheRight(), shark::blas::approxsolveSymmPosDefSystem(), shark::blas::createHouseholderReflection(), shark::GaussianLayer::energyTerm(), shark::BinaryLayer::energyTerm(), shark::estimateLogFreeEnergy(), shark::GaussianLayer::logMarginalize(), shark::logPartitionFunction(), shark::Energy< RBM >::logUnnormalizedProbabilityHidden(), shark::Energy< RBM >::logUnnormalizedProbabilityVisible(), main(), shark::negativeLogLikelihood(), shark::negativeLogLikelihoodFromLogPartition(), shark::KernelBasisDistance::numApproximatingVectors(), shark::CMAChromosome::serialize(), shark::RegularizationNetworkTrainer< InputType >::setPrecision(), shark::GaussianLayer::sufficientStatistics(), shark::BipolarLayer::sufficientStatistics(), shark::BinaryLayer::sufficientStatistics(), and shark::TruncatedExponentialLayer::sufficientStatistics().
const unsigned int h = 512 |
Definition at line 18 of file SparseAETutorial.cpp.
Referenced by shark::QpMcBoxDecomp< Matrix >::deactivateVariable(), shark::QpMcSimplexDecomp< Matrix >::deactivateVariable(), shark::QpMcDecomp< Matrix >::deactivateVariable(), shark::ZDT3::eval(), shark::ZDT2::eval(), shark::DTLZ7::eval(), shark::ZDT1::eval(), shark::ZDT6::eval(), shark::ZDT4::eval(), shark::MergeBudgetMaintenanceStrategy< RealVector >::MergingProblemFunction::eval(), shark::MergeBudgetMaintenanceStrategy< RealVector >::MergingProblemFunction::evalDerivative(), getSamples(), shark::MergeBudgetMaintenanceStrategy< RealVector >::reduceBudget(), and shark::HypervolumeCalculator::serialize().
const double lambda = 0.0002 |
Definition at line 25 of file SparseAETutorial.cpp.
Referenced by shark::LMCMA::init(), main(), shark::NegExponential< RngType >::p(), shark::Pegasos< VectorType >::solve(), shark::McPegasos< VectorType >::solve(), shark::LMCMA::step(), shark::LMCMA::suggestLambda(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::train(), and shark::PopulationBasedStepSizeAdaptation::update().
const unsigned int maxIter = 400 |
Definition at line 28 of file SparseAETutorial.cpp.
Referenced by main().
const unsigned int numhidden = 25 |
Definition at line 22 of file SparseAETutorial.cpp.
Referenced by main().
const unsigned int numsamples = 10000 |
Definition at line 16 of file SparseAETutorial.cpp.
Referenced by getSamples().
const unsigned int psize = 8 |
Definition at line 19 of file SparseAETutorial.cpp.
Referenced by getSamples(), and main().
const double rho = 0.01 |
Definition at line 23 of file SparseAETutorial.cpp.
Referenced by main(), shark::McSvmMMRTrainer< InputType, CacheType >::train(), shark::McSvmLLWTrainer< InputType, CacheType >::train(), and shark::McSvmWWTrainer< InputType, CacheType >::train().
const unsigned int w = 512 |
Definition at line 17 of file SparseAETutorial.cpp.
Referenced by shark::QpMcLinear< InputT >::add_scaled(), shark::NearestNeighborRegression< InputType >::eval(), shark::SoftNearestNeighborClassifier< InputType >::eval(), getSamples(), shark::WeightedSumKernel< InputType >::setParameterVector(), shark::Pegasos< VectorType >::solve(), shark::QpBoxLinear< InputT >::solve(), shark::QpMcLinear< InputT >::solve(), shark::QpMcDecomp< Matrix >::solve(), shark::QpBoxLinear< CompressedRealVector >::solve(), shark::QpMcDecomp< Matrix >::solveSMO(), shark::LinearMcSvmOVATrainer< InputType >::train(), shark::LinearMcSvmMMRTrainer< InputType >::train(), shark::LinearMcSvmReinforcedTrainer< InputType >::train(), shark::LinearMcSvmLLWTrainer< InputType >::train(), shark::LinearMcSvmADMTrainer< InputType >::train(), shark::LinearMcSvmATSTrainer< InputType >::train(), shark::LinearMcSvmATMTrainer< InputType >::train(), shark::LinearMcSvmCSTrainer< InputType >::train(), shark::LinearMcSvmWWTrainer< InputType >::train(), shark::LinearCSvmTrainer< InputType >::train(), shark::SquaredHingeLinearCSvmTrainer< InputType >::train(), shark::LassoRegression< InputVectorType >::trainInternal(), shark::QpMcSimplexDecomp< Matrix >::updateSMO(), and shark::QpMcBoxDecomp< Matrix >::updateSMO().