Esempio n. 1
0
 public Form1()
 {
     InitializeComponent();
     points            = new List <Point>();
     pictureBox1.Image = new Bitmap(pictureBox1.Width, pictureBox1.Height);
     graphics          = Graphics.FromImage(pictureBox1.Image);
     //nn = new NN(new int[] { 2, 2 });
     nn  = new NN(sizes);
     pen = new Pen(Color.White, 2.0F);
     //brush = Brushes.
 }
Esempio n. 2
0
        public NN(NN reference)
        {
            sizes = reference.Sizes;

            layers = new float[sizes.Length][];
            for (int i = 0; i < sizes.Length; i++)
            {
                layers[i] = new float[sizes[i]];
                layers[i][Sizes[i] - 1] = 1.0F;
            }
            weights = (float[][, ])reference.weights.Clone();
            errors_ = ErrorArr(layers);
            //Mutate();
        }
Esempio n. 3
0
 private void button3_Click(object sender, EventArgs e)
 {
     nn = new NN(sizes);
     points.Clear();
     Display();
 }