Esempio n. 1
0
 private void InitNN_Load(object sender, EventArgs e)
 {
     if (Manager == null)
     {
         Manager = new Layers_Manager();
     }
     Manager.G           = PanelProjection.CreateGraphics();
     Manager.Height      = PanelProjection.Size.Height;
     Manager.Width       = PanelProjection.Size.Width;
     InputSlotExsistence = false;
     DrawingThread       = new Thread(new ThreadStart(Manager.Draw));
 }
Esempio n. 2
0
 private void BtnCreateNetwork_Click(object sender, EventArgs e)
 {
     if (NUDLayerNumber.Value == 1)
     {
         Manager = new Layers_Manager();
         Manager.InputSlotSize = (int)NUDImageWidth.Value * (int)NUDImageHeight.Value;
         Manager.MaxError      = 1;
         Layer MainLayer = new Layer(0);
         MainLayer.LayerType = Neuron.NeuronType.Output;
         for (int i = 0; i < (int)NUDOutputNumber.Value; i++)
         {
             Neuron N = new Neuron();
             N.ParentLayer_Ref = MainLayer;
             N.Initialize(Neuron.NeuronType.Output);
             N.ID           = i;
             N.InputCount   = Manager.InputSlotSize;
             N.LearningRate = 0.2f;
             N.ImageTag     = imageList1.Images[i];
             string[] Data = BMPFiles[i].Split('\\');
             N.Tag  = Data[Data.Length - 1].Split('.')[0];
             N.Bias = 0.5f;
             N.Weights.Add(N.Bias);
             for (int j = 0; j < N.InputCount; j++)
             {
                 N.Weights.Add(0);
                 N.OldWeights.Add(0);
             }
             MainLayer.Neurons.Add(N);
             MainLayer.Count++;
         }
         MainLayer.InitializeLayer();
         Manager.Layers.Add(MainLayer);
         Layers_Manager Temp = MainInterface_Ref.MF.Manager;
         MainInterface_Ref.MF.Manager = Manager;
         MainInterface_Ref.SaveNetwork("Image_Processing.net");
         MainInterface_Ref.MF.Manager = Temp;
     }
 }
Esempio n. 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            if (DrawingThread.IsAlive)
            {
                DrawingThread.Abort();
            }
            Manager = new Layers_Manager();
            if (Debugger_Ref != null)
            {
                Debugger_Ref.LBTrace.Items.Clear();
                Manager.DynamicDebugger = Debugger_Ref;
            }
            Manager.G           = PanelProjection.CreateGraphics();
            Manager.Height      = PanelProjection.Size.Height;
            Manager.Width       = PanelProjection.Size.Width;
            InputSlotExsistence = false;
            DrawingThread       = new Thread(new ThreadStart(Manager.Draw));

            GBLayerOptions.Enabled = true;
            NUDInputSlot.Enabled   = true;
            BtnInputLayer.Enabled  = true;
            DrawingThread.Start();//Draw Network
        }