コード例 #1
0
        public void SaveMemoryToDB(Guid layerId, Guid userId, int number, DBInserter dbInserter)
        {
            // Saving networks info:
            dbInserter.InsertNeuron(Id, userId, layerId, number, _offsetValue, _offsetWeight);

            // Saving weights info:
            for (int i = 0; i < _weights.Length; i++)
            {
                dbInserter.InsertWeight(Id, userId, i, _weights[i]);
            }
        }
コード例 #2
0
ファイル: Layer.cs プロジェクト: Ande5/NN.Eva
        public void SaveMemoryToDB(Guid networkId, Guid userId, int number, DBInserter dbInserter)
        {
            // Saving layer info:
            dbInserter.InsertLayer(Id, userId, networkId, number);

            // Saving neurons info:
            for (int i = 0; i < _neuronList.Count; i++)
            {
                _neuronList[i].SaveMemoryToDB(Id, userId, i, dbInserter);
            }
        }
コード例 #3
0
        public void SaveMemoryToDB(Guid networkId, Guid userId, int number, DBInserter dbInserter)
        {
            // Saving layer info:
            dbInserter.InsertLayer(Id, userId, networkId, number);

            // Saving neurons info:
            int foreachIndex = 0;

            foreach (Neuron neuron in _neuronList)
            {
                neuron.SaveMemoryToDB(Id, userId, foreachIndex, dbInserter);
                foreachIndex++;
            }
        }
コード例 #4
0
        private void SavingMemoryToDB(DatabaseConfig dbConfig, string networkStructure, Guid userId)
        {
            try
            {
                DBInserter dbInserter = new DBInserter(dbConfig);

                // Saving networks info:
                _net.SaveMemoryToDB(Iteration, networkStructure, userId, dbInserter);
                Console.WriteLine("Networks memory backuped to database successfully!");
            }
            catch (Exception ex)
            {
                Logger.LogError(ErrorType.DBInsertError, "Save memory to database error!\n" + ex);
                Console.WriteLine($" {DateTime.Now} Save memory to database error!\n {ex}");
            }
        }
コード例 #5
0
ファイル: NeuralNetwork.cs プロジェクト: Ande5/NN.Eva
        public void SaveMemoryToDB(int iterations, string networkStructure, Guid userId, DBInserter dbInserter)
        {
            // Saving network info:
            dbInserter.InsertNetwork(Id, userId, iterations, networkStructure);

            // Saving layers info:
            for (int i = 0; i < _layerList.Count; i++)
            {
                _layerList[i].SaveMemoryToDB(Id, userId, i, dbInserter);
            }
        }
コード例 #6
0
        public void SaveMemoryToDB(int iterations, string networkStructure, Guid userId, DBInserter dbInserter)
        {
            // Saving network info:
            dbInserter.InsertNetwork(Id, userId, iterations, networkStructure);

            // Saving layers info:
            int foreachIndex = 0;

            foreach (Layer layer in _layerList)
            {
                layer.SaveMemoryToDB(Id, userId, foreachIndex, dbInserter);
                foreachIndex++;
            }
        }