Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //  Проверяем корректность задания структуры сети
            //int[] structure = netStructureBox.Text.Split(';').Select((c) => int.Parse(c)).ToArray();
            //if (structure.Length < 2 || structure[0] != 400 || structure[structure.Length - 1] != generator.figure_count)
            //{
            //    MessageBox.Show("А давайте вы структуру сети нормально запишите, ОК?", "Ошибка", MessageBoxButtons.OK);
            //    return;
            //};

            //AccordNet = new AccordNet(structure);
            //AccordNet.updateDelegate = UpdateLearningInfo;

            //net = AccordNet;
            //customnet = new MyNeuralNetwork(new int[] { 400, 700, 50, 10 });
            customnet = new MyNeuralNetwork(new int[] { 400, 700, 100, 10 }); //пример, lr-0.25, alpha - 0.15
            customnet.updateDelegate = UpdateLearningInfo;

            AccordNet = new AccordNet(new int[] { 400, 700, 200, 50, 10 });
            AccordNet.updateDelegate = UpdateLearningInfo;

            net = customnet;

            tlgBot.SetNet(net);
        }
Esempio n. 2
0
 private void SetNetwork()
 {
     if (netTypeBox.SelectedIndex == 0)
     {
         net = CustomNet;
     }
     else
     {
         net = AccordNet;
     }
 }
Esempio n. 3
0
 private void netTypeBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (netTypeBox.SelectedIndex == 0)
     {
         net = CustomNet;
     }
     else
     {
         net = AccordNet;
     }
 }
Esempio n. 4
0
        public TLGBotik(BaseNetwork net, UpdateTLGMessages updater)
        {
            var botKey = System.IO.File.ReadAllText("botkey.txt");

            mybot            = new AIMLBotik();
            botik            = new Telegram.Bot.TelegramBotClient(botKey);
            botik.OnMessage += Botik_OnMessageAsync;
            //botik.OnMessage += MyBotik_OnMessageAsync;
            formUpdater = updater;
            perseptron  = net;
        }
Esempio n. 5
0
        private void button3_Click(object sender, EventArgs e)
        {
            //  Проверяем корректность задания структуры сети
            int[] structure = netStructureBox.Text.Split(';').Select((c) => int.Parse(c)).ToArray();
            if (structure.Length < 2 || structure[0] != 400 || structure[structure.Length - 1] != generator.figure_count)
            {
                MessageBox.Show("А давайте вы структуру сети нормально запишите, ОК?", "Ошибка", MessageBoxButtons.OK);
                return;
            }
            ;

            CustomNet = new NeuralNetwork(structure);
            CustomNet.updateDelegate = UpdateLearningInfo;

            AccordNet = new AccordNet(structure);
            AccordNet.updateDelegate = UpdateLearningInfo;

            net = CustomNet;
        }
Esempio n. 6
0
 public void SetNet(BaseNetwork net)
 {
     perseptron = net;
     formUpdater("Net updated!");
 }
Esempio n. 7
0
 private void netTypeBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     net = AccordNet;
 }