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

switched to linear neuron (test), bug correct in the DoPredictBatch method

parent 7eee49a4
No related merge requests found
......@@ -395,9 +395,11 @@ void AutoencoderModel<TInputValue,NeuronType>
data = net.encode(data);
}
*/
data = m_net.evalLayer( m_net.layerMatrices().size()/2 ,data); // features layer for a network containing the encoder and decoder part
data = m_net.evalLayer( m_net.layerMatrices().size()/2-1 ,data); // features layer for a network containing the encoder and decoder part
std::cout << data.element(0) << std::endl;
unsigned int id = startIndex;
target.SetSize(this->m_Dimension);
for(const auto& p : data.elements())
{
for(unsigned int a = 0; a < this->m_Dimension; ++a){
......
......@@ -46,7 +46,7 @@ using TiedAutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTa
*/
template <class TInputValue, class TTargetValue>
using AutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::TanhNeuron> ;
using AutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::LinearNeuron> ;
template <class TInputValue, class TTargetValue>
......
......@@ -103,7 +103,7 @@ public:
#ifdef OTB_USE_SHARK
// typedef shark::Autoencoder< shark::TanhNeuron, shark::LinearNeuron> AutoencoderType;
typedef shark::TanhNeuron NeuronType;
typedef shark::LinearNeuron NeuronType;
typedef otb::AutoencoderModel<InputValueType, NeuronType> AutoencoderModelType;
/*
// typedef shark::TiedAutoencoder< shark::TanhNeuron, shark::LinearNeuron> TiedAutoencoderType;
......
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