encog-dotnet-core
encog-dotnet-core copied to clipboard
System.ArgumentOutOfRangeException when i try to see hidden neuron
I consruct a simple network Network = new BasicNetwork(); Network.AddLayer(new BasicLayer(null, true, 2)); Network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, 3)); Network.AddLayer(new BasicLayer(new ActivationSigmoid(), false, 1)); Network.Structure.FinalizeStructure(); Network.Reset();
And when i try to see structure network Console.WriteLine(string.Format("HiddenLayers {0}", Network.Structure.Layers.Count - 2));//1 input, 1 output Console.WriteLine(string.Format("HiddenUnits {0}", Network.Structure.Layers[1].NeuronCount));
HiddenLayers -good HiddenUnits - System.ArgumentOutOfRangeException
Why is that?
Console.WriteLine(string.Format("HiddenUnits: {0}", Network.GetLayerNeuronCount(1) ));
Looking at Network.Structure.Layers (which is a NeuralStructure type), it looks like the Layers property's private field is set readonly. This ultimately affects FinalizeStructure's ability to set properties of the layers.
I'll see if I can add a test case and a modification to the NeuralStructure class.