Skip to content
Snippets Groups Projects
Commit f3dbbd38 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: no support for tied autoencoder yet

parent 7b1aff43
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ private:
SetName("TrainDimensionalityReduction");
SetDescription("Trainer for the dimensionality reduction algorithms used in"
" the ImageDimensionalityReduction and VectorDimensionalityReduction applications.");
AddParameter(ParameterType_Group, "io", "Input and output data");
SetParameterDescription("io", "This group of parameters allows setting input and output data.");
......@@ -83,8 +83,7 @@ private:
AddParameter(ParameterType_OutputFilename, "io.out", "Output model");
SetParameterDescription("io.out", "Output file containing the estimated model (.txt format).");
AddParameter(ParameterType_InputFilename, "io.stats", "Input XML image statistics file");
MandatoryOff("io.stats");
SetParameterDescription("io.stats", "XML file containing mean and variance of each feature.");
......
......@@ -33,22 +33,11 @@ void
TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
::InitAutoencoderParams()
{
AddChoice("algorithm.tiedautoencoder", "Shark Tied Autoencoder");
AddChoice("algorithm.autoencoder", "Shark Autoencoder");
SetParameterDescription("algorithm.autoencoder",
"This group of parameters allows setting Shark autoencoder parameters. "
);
//Tied Autoencoder
AddParameter(ParameterType_Choice, "algorithm.autoencoder.istied",
"tied weighth <tied/untied>");
SetParameterDescription(
"algorithm.autoencoder.istied",
"Parameter that determine if the weights are tied or not <tied/untied>");
AddChoice("algorithm.autoencoder.istied.yes","Tied weigths");
AddChoice("algorithm.autoencoder.istied.no","Untied weights");
//Number Of Iterations
AddParameter(ParameterType_Int, "algorithm.autoencoder.nbiter",
"Maximum number of iterations during training");
......@@ -116,17 +105,7 @@ TrainDimensionalityReductionApplicationBase<TInputValue,TOutputValue>
{
typedef shark::LogisticNeuron NeuronType;
typedef otb::AutoencoderModel<InputValueType, NeuronType> AutoencoderModelType;
std::string TiedWeigth = GetParameterString("algorithm.autoencoder.istied");
std::cout << TiedWeigth << std::endl;
if(TiedWeigth == "no")
{
TrainAutoencoder<AutoencoderModelType>(trainingListSample,modelPath);
}
if(TiedWeigth != "yes" && TiedWeigth != "no")
{
std::cerr << "istied : invalid choice <yes/no>" << std::endl;
}
TrainAutoencoder<AutoencoderModelType>(trainingListSample,modelPath);
}
template <class TInputValue, class TOutputValue>
......
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