Ejemplo n.º 1
0
        private void btn_CNN_load_Click(object sender, EventArgs e)
        {
            string path = tb_network_path.Text;

            if ((path == null) || (path == ""))
            {
                MessageBox.Show("Path network file is empty");
                return;
            }
            if (!File.Exists(path))
            {
                MessageBox.Show("Network doesn't exist");
                return;
            }
            int n = network.LoadCNN(path);

            if (n < 0)
            {
                MessageBox.Show("Input network file is not correct");
                return;
            }
            lLayers_count.Text  = n.ToString();
            lClasses_count.Text = network.GetClassesCount().ToString();
            if (network.IsLearned())
            {
                lLearned.Text = "Learned";
            }
            var p = Path.GetFileName(tb_network_path.Text);

            p = p.Substring(p.IndexOf('_') + 1, p.IndexOf('.') - p.IndexOf('_') - 1);
            lAccuracy.Text = p;
            MessageBox.Show("Network Loaded");
        }