Skip to content
Snippets Groups Projects
Commit 25e4c6a2 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

dimreduc model added (not used at the moment), trainer app working for autoencoder

parent 9e6b26ab
No related branches found
No related tags found
1 merge request!4Dimensionality reduction algorithms
#ifndef AutoencoderModel_h
#define AutoencoderModel_h
#include "DimensionalityReductionModel.h"
namespace otb
{
template <class TInputValue, class AutoencoderType>
class AutoencoderModel: public DimensionalityReductionModel<TInputValue>
{
public:
typedef AutoencoderModel Self;
typedef DimensionalityReductionModel<TInputValue> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef TInputValue InputValueType;
typedef itk::VariableLengthVector<InputValueType> InputSampleType;
typedef itk::Statistics::ListSample<InputSampleType> InputListSampleType;
void Save(const std::string & filename, const std::string & name="") {};
void Load(const std::string & filename, const std::string & name="") {};
void Train();
void Dimensionality_reduction() {};
protected:
AutoencoderModel(){};
};
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "AutoencoderModel.txx"
#endif
#endif
#ifndef AutoencoderModel_txx
#define AutoencoderModel_txx
#include "AutoencoderModel.h"
namespace otb
{
template <class TInputValue, class AutoencoderType>
void AutoencoderModel<TInputValue,AutoencoderType>::Train()
{
}
} // namespace otb
#endif
#ifndef DimensionalityReductionModel_h
#define DimensionalityReductionModel_h
#include "itkObject.h"
#include "itkListSample.h"
namespace otb
{
template <class TInputValue>
class DimensionalityReductionModel: public itk::Object
{
public:
typedef DimensionalityReductionModel Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef TInputValue InputValueType;
typedef itk::VariableLengthVector<InputValueType> InputSampleType;
typedef itk::Statistics::ListSample<InputSampleType> InputListSampleType;
itkSetObjectMacro(InputListSample,InputListSampleType);
itkGetObjectMacro(InputListSample,InputListSampleType);
itkGetConstObjectMacro(InputListSample,InputListSampleType);
virtual void Save(const std::string & filename, const std::string & name="") = 0;
virtual void Load(const std::string & filename, const std::string & name="") = 0;
virtual void Train() = 0;
virtual void Dimensionality_reduction() = 0;
protected:
DimensionalityReductionModel(){};
typename InputListSampleType::Pointer m_InputListSample;
};
} // end namespace otb
//#ifndef OTB_MANUAL_INSTANTIATION
//#include "DimensionalityReductionModel.txx"
//#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment