Commit 5bf575f9 authored by Jordi Inglada's avatar Jordi Inglada

REFAC: rename classes and files and move some of them to the

application module
parent 918ef4e8
......@@ -23,10 +23,10 @@
#include "otbStandardWriterWatcher.h"
#include "otbStatisticsXMLFileReader.h"
#include "otbShiftScaleVectorImageFilter.h"
#include "ImageDimensionalityReductionFilter.h"
#include "otbImageDimensionalityReductionFilter.h"
#include "otbMultiToMonoChannelExtractROI.h"
#include "otbImageToVectorImageCastFilter.h"
#include "DimensionalityReductionModelFactory.h"
#include "otbDimensionalityReductionModelFactory.h"
namespace otb
{
......
......@@ -13,19 +13,19 @@
#include <fstream> // write the model file
#include "DimensionalityReductionModelFactory.h"
#include "cbLearningApplicationBaseDR.h"
#include "otbDimensionalityReductionModelFactory.h"
#include "otbTrainDimensionalityReductionApplicationBase.h"
namespace otb
{
namespace Wrapper
{
class TrainDimensionalityReduction : public cbLearningApplicationBaseDR<float,float>
class TrainDimensionalityReduction : public TrainDimensionalityReductionApplicationBase<float,float>
{
public:
typedef TrainDimensionalityReduction Self;
typedef cbLearningApplicationBaseDR<float, float> Superclass;
typedef TrainDimensionalityReductionApplicationBase<float, float> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -26,8 +26,7 @@
#include "otbStatisticsXMLFileReader.h"
#include "itkListSample.h"
#include "otbShiftScaleSampleListFilter.h"
#include "DimensionalityReductionModelFactory.h"
//#include "DimensionalityReductionModel.h"
#include "otbDimensionalityReductionModelFactory.h"
#include <time.h>
namespace otb
......
......@@ -2,7 +2,7 @@
#ifndef cbTrainAutoencoder_txx
#define cbTrainAutoencoder_txx
#include "cbLearningApplicationBaseDR.h"
#include "otbTrainDimensionalityReductionApplicationBase.h"
namespace otb
{
......@@ -11,7 +11,7 @@ namespace Wrapper
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::InitAutoencoderParams()
{
......@@ -103,9 +103,9 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::BeforeTrainAutoencoder(typename ListSampleType::Pointer trainingListSample,
std::string modelPath)
std::string modelPath)
{
std::string TiedWeigth = GetParameterString("model.autoencoder.istied");
std::cout << TiedWeigth << std::endl;
......@@ -130,8 +130,7 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
template <typename autoencoderchoice>
void cbLearningApplicationBaseDR<TInputValue,TOutputValue>
::TrainAutoencoder(typename ListSampleType::Pointer trainingListSample,std::string modelPath)
void TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>::TrainAutoencoder(typename ListSampleType::Pointer trainingListSample,std::string modelPath)
{
typename autoencoderchoice::Pointer dimredTrainer = autoencoderchoice::New();
itk::Array<unsigned int> nb_neuron;
......
......@@ -2,7 +2,7 @@
#ifndef cbTrainPCA_txx
#define cbTrainPCA_txx
#include "cbLearningApplicationBaseDR.h"
#include "otbTrainDimensionalityReductionApplicationBase.h"
namespace otb
{
......@@ -11,7 +11,7 @@ namespace Wrapper
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::InitPCAParams()
{
......@@ -34,7 +34,7 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
}
template <class TInputValue, class TOutputValue>
void cbLearningApplicationBaseDR<TInputValue,TOutputValue>
void TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::TrainPCA(typename ListSampleType::Pointer trainingListSample,std::string modelPath)
{
typename PCAModelType::Pointer dimredTrainer = PCAModelType::New();
......
#ifndef cbTrainSOM_txx
#define cbTrainSOM_txx
#include "cbLearningApplicationBaseDR.h"
#include "otbTrainDimensionalityReductionApplicationBase.h"
namespace otb
{
......@@ -10,7 +10,7 @@ namespace Wrapper
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::InitSOMParams()
{
......@@ -76,7 +76,7 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::BeforeTrainSOM(typename ListSampleType::Pointer trainingListSample,
std::string modelPath)
{
......@@ -111,7 +111,7 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
template <typename somchoice>
void cbLearningApplicationBaseDR<TInputValue,TOutputValue>
void TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::TrainSOM(typename ListSampleType::Pointer trainingListSample,std::string modelPath)
{
using TemplateEstimatorType = typename somchoice::EstimatorType;
......
......@@ -12,13 +12,13 @@
#include "itkVariableLengthVector.h"
//Estimator
#include "DimensionalityReductionModelFactory.h"
#include "otbDimensionalityReductionModelFactory.h"
#include "SOMModel.h"
#include "otbSOMModel.h"
#ifdef OTB_USE_SHARK
#include "AutoencoderModel.h"
#include "PCAModel.h"
#include "otbAutoencoderModel.h"
#include "otbPCAModel.h"
#endif
namespace otb
......@@ -59,86 +59,85 @@ namespace Wrapper
* \ingroup OTBAppClassification
*/
template <class TInputValue, class TOutputValue>
class cbLearningApplicationBaseDR: public Application
class TrainDimensionalityReductionApplicationBase: public Application
{
public:
/** Standard class typedefs. */
typedef cbLearningApplicationBaseDR Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef TrainDimensionalityReductionApplicationBase Self;
typedef Application Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Standard macro */
itkTypeMacro(cbLearningApplicationBaseDR, otb::Application)
/** Standard macro */
itkTypeMacro(TrainDimensionalityReductionApplicationBase, otb::Application)
typedef TInputValue InputValueType;
typedef TOutputValue OutputValueType;
typedef TInputValue InputValueType;
typedef TOutputValue OutputValueType;
typedef otb::VectorImage<InputValueType> SampleImageType;
typedef typename SampleImageType::PixelType PixelType;
typedef otb::VectorImage<InputValueType> SampleImageType;
typedef typename SampleImageType::PixelType PixelType;
typedef otb::DimensionalityReductionModelFactory<
InputValueType, OutputValueType> ModelFactoryType;
typedef typename ModelFactoryType::DimensionalityReductionModelTypePointer ModelPointerType;
typedef typename ModelFactoryType::DimensionalityReductionModelType ModelType;
typedef otb::DimensionalityReductionModelFactory<
InputValueType, OutputValueType> ModelFactoryType;
typedef typename ModelFactoryType::DimensionalityReductionModelTypePointer ModelPointerType;
typedef typename ModelFactoryType::DimensionalityReductionModelType ModelType;
typedef typename ModelType::InputSampleType SampleType;
typedef typename ModelType::InputListSampleType ListSampleType;
typedef typename ModelType::InputSampleType SampleType;
typedef typename ModelType::InputListSampleType ListSampleType;
// Dimensionality reduction models
// Dimensionality reduction models
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 2> Map2DType;
typedef otb::SOMModel<InputValueType, 2> SOM2DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 2> Map2DType;
typedef otb::SOMModel<InputValueType, 2> SOM2DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 3> Map3DType;
typedef otb::SOMModel<InputValueType, 3> SOM3DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 3> Map3DType;
typedef otb::SOMModel<InputValueType, 3> SOM3DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 4> Map4DType;
typedef otb::SOMModel<InputValueType, 4> SOM4DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 4> Map4DType;
typedef otb::SOMModel<InputValueType, 4> SOM4DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 5> Map5DType;
typedef otb::SOMModel<InputValueType, 5> SOM5DModelType;
//typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 5> Map5DType;
typedef otb::SOMModel<InputValueType, 5> SOM5DModelType;
#ifdef OTB_USE_SHARK
// typedef shark::Autoencoder< shark::TanhNeuron, shark::LinearNeuron> AutoencoderType;
typedef shark::LogisticNeuron NeuronType;
typedef otb::AutoencoderModel<InputValueType, NeuronType> AutoencoderModelType;
/*
// typedef shark::Autoencoder< shark::TanhNeuron, shark::LinearNeuron> AutoencoderType;
typedef shark::LogisticNeuron NeuronType;
typedef otb::AutoencoderModel<InputValueType, NeuronType> AutoencoderModelType;
/*
// typedef shark::TiedAutoencoder< shark::TanhNeuron, shark::LinearNeuron> TiedAutoencoderType;
typedef shark::TiedAutoencoder< shark::TanhNeuron, shark::TanhNeuron> TiedAutoencoderType;
typedef otb::AutoencoderModel<InputValueType, TiedAutoencoderType> TiedAutoencoderModelType;
*/
typedef otb::PCAModel<InputValueType> PCAModelType;
typedef otb::PCAModel<InputValueType> PCAModelType;
#endif
protected:
cbLearningApplicationBaseDR();
TrainDimensionalityReductionApplicationBase();
~TrainDimensionalityReductionApplicationBase();
~cbLearningApplicationBaseDR() ITK_OVERRIDE;
/** Generic method to train and save the machine learning model. This method
/** Generic method to train and save the machine learning model. This method
* uses specific train methods depending on the chosen model.*/
void Train(typename ListSampleType::Pointer trainingListSample,
std::string modelPath);
void Train(typename ListSampleType::Pointer trainingListSample,
std::string modelPath);
/** Generic method to load a model file and use it to classify a sample list*/
void Reduce(typename ListSampleType::Pointer validationListSample,
std::string modelPath);
/** Generic method to load a model file and use it to classify a sample list*/
void Reduce(typename ListSampleType::Pointer validationListSample,
std::string modelPath);
/** Init method that creates all the parameters for machine learning models */
void DoInit();
/** Init method that creates all the parameters for machine learning models */
void DoInit();
private:
/** Specific Init and Train methods for each machine learning model */
//@{
/** Specific Init and Train methods for each machine learning model */
//@{
void InitSOMParams();
template <class somchoice>
void TrainSOM(typename ListSampleType::Pointer trainingListSample, std::string modelPath);
void BeforeTrainSOM(typename ListSampleType::Pointer trainingListSample, std::string modelPath);
void InitSOMParams();
template <class somchoice>
void TrainSOM(typename ListSampleType::Pointer trainingListSample, std::string modelPath);
void BeforeTrainSOM(typename ListSampleType::Pointer trainingListSample, std::string modelPath);
#ifdef OTB_USE_SHARK
void InitAutoencoderParams();
......@@ -152,19 +151,19 @@ private:
#endif
//@}
//@}
};
}
}
#ifndef OTB_MANUAL_INSTANTIATION
#include "cbLearningApplicationBaseDR.txx"
#include "cbTrainSOM.txx"
#include "otbTrainDimensionalityReductionApplicationBase.txx"
#include "otbDimensionalityReductionTrainSOM.txx"
#ifdef OTB_USE_SHARK
#include "cbTrainAutoencoder.txx"
#include "cbTrainPCA.txx"
#include "otbDimensionalityReductionTrainAutoencoder.txx"
#include "otbDimensionalityReductionTrainPCA.txx"
#endif
#endif
......
......@@ -17,7 +17,7 @@
#ifndef cbLearningApplicationBaseDR_txx
#define cbLearningApplicationBaseDR_txx
#include "cbLearningApplicationBaseDR.h"
#include "otbTrainDimensionalityReductionApplicationBase.h"
namespace otb
{
......@@ -25,21 +25,21 @@ namespace Wrapper
{
template <class TInputValue, class TOutputValue>
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
::cbLearningApplicationBaseDR()
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::TrainDimensionalityReductionApplicationBase()
{
}
template <class TInputValue, class TOutputValue>
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
::~cbLearningApplicationBaseDR()
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::~TrainDimensionalityReductionApplicationBase()
{
ModelFactoryType::CleanFactories();
}
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::DoInit()
{
AddDocTag(Tags::Learning);
......@@ -60,14 +60,14 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::Reduce(typename ListSampleType::Pointer validationListSample,std::string modelPath)
{
}
template <class TInputValue, class TOutputValue>
void
cbLearningApplicationBaseDR<TInputValue,TOutputValue>
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::Train(typename ListSampleType::Pointer trainingListSample,
std::string modelPath)
{
......@@ -84,10 +84,10 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
if(modelName == "autoencoder")
{
#ifdef OTB_USE_SHARK
BeforeTrainAutoencoder(trainingListSample,modelPath);
#else
otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
#endif
BeforeTrainAutoencoder(trainingListSample,modelPath);
#else
otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
#endif
}
/*
if(modelName == "tiedautoencoder")
......
......@@ -19,11 +19,10 @@
#define SOMFactory_txx
#include "SOMModelFactory.h"
#include "otbSOMModelFactory.h"
#include "itkCreateObjectFunction.h"
#include "SOMModel.h"
//#include <shark/Algorithms/Trainers/PCA.h>
#include "otbSOMModel.h"
#include "itkVersion.h"
namespace otb
......@@ -39,8 +38,8 @@ SOMModelFactory<TInputValue,TOutputValue,MapDimension>::SOMModelFactory()
subclass.c_str(),
"SOM DR Model",
1,
// itk::CreateObjectFunction<AutoencoderModel<TInputValue,TOutputValue> >::New());
itk::CreateObjectFunction<SOMModel<TInputValue, MapDimension>>::New());
itk::CreateObjectFunction<SOMModel<TInputValue, MapDimension>>::New());
}
template <class TInputValue, class TOutputValue, unsigned int MapDimension>
......
......@@ -16,8 +16,8 @@ class ITK_EXPORT AutoencoderModel: public MachineLearningModel<itk::VariableLen
public:
typedef AutoencoderModel Self;
typedef MachineLearningModel<itk::VariableLengthVector< TInputValue> , itk::VariableLengthVector< TInputValue>> Superclass;
typedef AutoencoderModel Self;
typedef MachineLearningModel<itk::VariableLengthVector< TInputValue> , itk::VariableLengthVector< TInputValue>> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -131,7 +131,7 @@ private:
#ifndef OTB_MANUAL_INSTANTIATION
#include "AutoencoderModel.txx"
#include "otbAutoencoderModel.txx"
#endif
......
......@@ -73,18 +73,18 @@ void AutoencoderModel<TInputValue,NeuronType>::Train()
/// Training of the first Autoencoder (first and last layer of the FF network)
if (m_Epsilon > 0){
shark::TrainingProgress<> criterion(5,m_Epsilon);
shark::TrainingProgress<> criterion(5,m_Epsilon);
OutAutoencoderType net;
if (m_Noise[0] != 0) // Shark doesn't allow to train a layer using a sparsity term AND a noisy input. (shark::SparseAutoencoderError takes an autoen
{
TrainOneLayer(criterion,net,0 , m_NumberOfHiddenNeurons[0],m_Noise[0],m_Regularization[0], inputSamples,ofs);
}
else
{
TrainOneSparseLayer( criterion, net , 0 , m_NumberOfHiddenNeurons[0],m_Rho[0],m_Beta[0],m_Regularization[0],inputSamples, ofs);
}
criterion.reset();
OutAutoencoderType net;
if (m_Noise[0] != 0) // Shark doesn't allow to train a layer using a sparsity term AND a noisy input. (shark::SparseAutoencoderError takes an autoen
{
TrainOneLayer(criterion,net,0 , m_NumberOfHiddenNeurons[0],m_Noise[0],m_Regularization[0], inputSamples,ofs);
}
else
{
TrainOneSparseLayer( criterion, net , 0 , m_NumberOfHiddenNeurons[0],m_Rho[0],m_Beta[0],m_Regularization[0],inputSamples, ofs);
}
criterion.reset();
}
else {
......
......@@ -62,7 +62,7 @@ using TiedAutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTa
#ifndef OTB_MANUAL_INSTANTIATION
#include "AutoencoderModelFactory.txx"
#include "otbAutoencoderModelFactory.txx"
#endif
#endif
......
......@@ -19,10 +19,10 @@
#define AutoencoderModelFactory_txx
#include "AutoencoderModelFactory.h"
#include "otbAutoencoderModelFactory.h"
#include "itkCreateObjectFunction.h"
#include "AutoencoderModel.h"
#include "otbAutoencoderModel.h"
#include "itkVersion.h"
namespace otb
......@@ -38,8 +38,8 @@ AutoencoderModelFactoryBase<TInputValue,TOutputValue, NeuronType>::AutoencoderMo
subclass.c_str(),
"Shark AE ML Model",
1,
// itk::CreateObjectFunction<AutoencoderModel<TInputValue,TOutputValue> >::New());
itk::CreateObjectFunction<AutoencoderModel<TInputValue,NeuronType > >::New());
// itk::CreateObjectFunction<AutoencoderModel<TInputValue,TOutputValue> >::New());
itk::CreateObjectFunction<AutoencoderModel<TInputValue,NeuronType > >::New());
}
template <class TInputValue, class TOutputValue, class NeuronType>
......
......@@ -78,7 +78,7 @@ private:
} // end namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "DimensionalityReductionModelFactory.txx"
#include "otbDimensionalityReductionModelFactory.txx"
#endif
#endif
......@@ -18,14 +18,14 @@
#ifndef DimensionalityReductionModelFactory_txx
#define DimensionalityReductionFactory_txx
#include "DimensionalityReductionModelFactory.h"
#include "otbDimensionalityReductionModelFactory.h"
#include "otbConfigure.h"
#include "SOMModelFactory.h"
#include "otbSOMModelFactory.h"
#ifdef OTB_USE_SHARK
#include "AutoencoderModelFactory.h"
#include "PCAModelFactory.h"
#include "otbAutoencoderModelFactory.h"
#include "otbPCAModelFactory.h"
#endif
#include "itkMutexLockHolder.h"
......@@ -34,16 +34,6 @@
namespace otb
{
/*
template <class TInputValue, class TTargetValue>
// using AutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::Autoencoder<shark::TanhNeuron, shark::LinearNeuron>> ;
using AutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::Autoencoder<shark::TanhNeuron, shark::TanhNeuron>> ;
template <class TInputValue, class TTargetValue>
// using TiedAutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::TiedAutoencoder< shark::TanhNeuron, shark::LinearNeuron>> ;
using TiedAutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::TiedAutoencoder< shark::TanhNeuron, shark::TanhNeuron>> ;
*/
template <class TInputValue, class TTargetValue>
using AutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::LogisticNeuron> ;
......@@ -130,7 +120,7 @@ DimensionalityReductionModelFactory<TInputValue,TOutputValue>
#ifdef OTB_USE_SHARK
RegisterFactory(PCAModelFactory<TInputValue,TOutputValue>::New());
RegisterFactory(AutoencoderModelFactory<TInputValue,TOutputValue>::New());
// RegisterFactory(TiedAutoencoderModelFactory<TInputValue,TOutputValue>::New());
// RegisterFactory(TiedAutoencoderModelFactory<TInputValue,TOutputValue>::New());
#endif
}
......@@ -196,8 +186,7 @@ DimensionalityReductionModelFactory<TInputValue,TOutputValue>
#ifdef OTB_USE_SHARK
// Autoencoder
AutoencoderModelFactory<TInputValue,TOutputValue> *aeFactory =
AutoencoderModelFactory<TInputValue,TOutputValue> *aeFactory =
dynamic_cast<AutoencoderModelFactory<TInputValue,TOutputValue> *>(*itFac);
if (aeFactory)
{
......
......@@ -139,7 +139,7 @@ private:
};
} // End namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "ImageDimensionalityReductionFilter.txx"
#include "otbImageDimensionalityReductionFilter.txx"
#endif
#endif
......@@ -18,7 +18,7 @@
#ifndef otbImageClassificationFilter_txx
#define otbImageClassificationFilter_txx
#include "ImageDimensionalityReductionFilter.h"
#include "otbImageDimensionalityReductionFilter.h"
#include "itkImageRegionIterator.h"
#include "itkProgressReporter.h"
......
......@@ -75,7 +75,7 @@ private:
#ifndef OTB_MANUAL_INSTANTIATION
#include "PCAModel.txx"
#include "otbPCAModel.txx"
#endif
......
......@@ -51,7 +51,7 @@ private:
#ifndef OTB_MANUAL_INSTANTIATION
#include "PCAModelFactory.txx"
#include "otbPCAModelFactory.txx"
#endif
#endif
......
......@@ -19,11 +19,10 @@
#define PCAFactory_txx
#include "PCAModelFactory.h"
#include "otbPCAModelFactory.h"
#include "itkCreateObjectFunction.h"
#include "PCAModel.h"
//#include <shark/Algorithms/Trainers/PCA.h>
#include "otbPCAModel.h"
#include "itkVersion.h"
namespace otb
......@@ -39,8 +38,7 @@ PCAModelFactory<TInputValue,TOutputValue>::PCAModelFactory()
subclass.c_str(),
"Shark PCA ML Model",
1,
// itk::CreateObjectFunction<AutoencoderModel<TInputValue,TOutputValue> >::New());
itk::CreateObjectFunction<PCAModel<TInputValue>>::New());
itk::CreateObjectFunction<PCAModel<TInputValue>>::New());
}
template <class TInputValue, class TOutputValue>
......
......@@ -132,7 +132,7 @@ private:
#ifndef OTB_MANUAL_INSTANTIATION
#include "SOMModel.txx"
#include "otbSOMModel.txx"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment