Пример #1
0
        public override void InitializeNetwork()
        {
            //
            m_Layers = new ANNLayer[m_Parameters.m_NumHiddenLayers + 1];

            //create neurons in hidden layers
            for (int i = 0; i < m_Parameters.m_NumHiddenLayers; i++)
            {
                if (i == 0)
                {
                    m_Layers[i] = new ANNLayer(m_InputCount, m_Parameters.m_NeuronsInHiddenLayer, m_Parameters.m_ActFunction);
                }
                else
                {
                    m_Layers[i] = new ANNLayer(m_Parameters.m_NeuronsInHiddenLayer, m_Parameters.m_NeuronsInHiddenLayer, m_Parameters.m_ActFunction);
                }
            }

            //create neurons and error array for the last layer, which is usualy 1
            m_Layers[m_Parameters.m_NumHiddenLayers] = new ANNLayer(m_Parameters.m_NeuronsInHiddenLayer, m_OutputCount, m_Parameters.m_ActFunction);
        }
Пример #2
0
        public override void InitializeNetwork()
        {
            //
            m_Layers = new Layer[m_Parameters.m_NumHiddenLayers + 1];

            //create neurons in hidden layers
            for (int i = 0; i < m_Parameters.m_NumHiddenLayers; i++)
            {
                if (i == 0)
                {
                    m_Layers[i] = new ANNLayer(m_InputCount, m_Parameters.m_NeuronsInHiddenLayer, m_Parameters.m_ActFunction);
                }
                else
                {
                    m_Layers[i] = new ANNLayer(m_Parameters.m_NeuronsInHiddenLayer, m_Parameters.m_NeuronsInHiddenLayer, m_Parameters.m_ActFunction);
                }
            }

            //create neurons array for the last layer, with logistic Sigfmoid activation
            Layer ly = new ANNLayer(m_Parameters.m_NeuronsInHiddenLayer, m_OutputCount, new Sigmoid(1.0));

            m_Layers[m_Parameters.m_NumHiddenLayers] = ly;
        }