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. }
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(); }
private void button3_Click(object sender, EventArgs e) { nn = new NN(sizes); points.Clear(); Display(); }