From e5ad35987f66e3c498feeb43561286e33ee401bf Mon Sep 17 00:00:00 2001 From: Jordi Inglada <jordi.inglada@cesbio.cnes.fr> Date: Thu, 2 Nov 2017 16:34:49 +0100 Subject: [PATCH] ENH: suppress stdout messages --- .../app/otbVectorDimensionalityReduction.cxx | 4 +--- .../include/otbPCAModel.txx | 10 ++++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Modules/Applications/AppDimensionalityReduction/app/otbVectorDimensionalityReduction.cxx b/Modules/Applications/AppDimensionalityReduction/app/otbVectorDimensionalityReduction.cxx index 0a8f3eac00..16e5dfaf17 100644 --- a/Modules/Applications/AppDimensionalityReduction/app/otbVectorDimensionalityReduction.cxx +++ b/Modules/Applications/AppDimensionalityReduction/app/otbVectorDimensionalityReduction.cxx @@ -253,9 +253,7 @@ class VectorDimensionalityReduction : public Application ListSampleType::Pointer target = m_Model->PredictBatch(listSample); /** Create/Update Output Shape file */ - - std::cout << GetParameterStringList("featout").size() << std::endl; - + ogr::DataSource::Pointer output; ogr::DataSource::Pointer buffer = ogr::DataSource::New(); bool updateMode = false; diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.txx b/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.txx index 364dd8def3..c5d274b324 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.txx +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.txx @@ -93,9 +93,8 @@ void PCAModel<TInputValue>::Save(const std::string & filename, const std::string Shark::ListSampleToSharkVector(this->GetInputListSample(), features); shark::Data<shark::RealVector> inputSamples = shark::createDataFromRange( features ); otxt << "Reconstruction error : " << loss.eval(inputSamples,m_decoder(m_encoder(inputSamples))) << std::endl; - std::cout << "Reconstruction error : " << loss.eval(inputSamples,m_decoder(m_encoder(inputSamples))) << std::endl; - otxt.close(); - } +otxt.close(); +} } template <class TInputValue> @@ -175,9 +174,8 @@ void PCAModel<TInputValue> //target.SetElement(a,p[a]); } - //std::cout << p << std::endl; - targets->SetMeasurementVector(id,target); - ++id; +targets->SetMeasurementVector(id,target); +++id; } -- GitLab