Пример #1
0
        public override NeuralNetwork Copy()
        {
            var hidden = new List <int>();

            for (int i = 1; i < _values.Count - 1; i++)
            {
                hidden.Add(_values[i].Count);
            }
            var result = new SimpleNetwork(_values[0].Count, _values[_values.Count - 1].Count, _func, hidden.ToArray());

            result.Copy(this);
            return(result);
        }
Пример #2
0
 private void Copy(SimpleNetwork other)
 {
     for (int i = 0; i < _weights.Count; i++)
     {
         for (int j = 0; j < _weights[i].Count; j++)
         {
             for (int k = 0; k < _weights[i][j].Count; k++)
             {
                 _weights[i][j][k] = other._weights[i][j][k];
             }
         }
     }
     Id = other.Id;
 }