Example #1
0
        private void mnistDesktopButton_Click(object sender, EventArgs e)
        {
            MNistEnvironment env = new MNistEnvironment(this);

            env.Path        = Application.StartupPath + "\\..\\..\\..\\..\\..\\Mnist\\";
            env.ItemsToLoad = 5;
            _agents.Add(env);
            ImagePreprocessor preprocessor = new ImagePreprocessor(this);

            _agents.Add(preprocessor);
            HTMBuilder htmBuilder = new HTMBuilder(this);

            _agents.Add(htmBuilder);
            preprocessor.InputAgent = env;          // link the preprocessor to the environment
            htmBuilder.InputAgent   = preprocessor; // link the htm builder to the preprocessor

            // Set the layout
            preprocessor.MdiParent = this;
            preprocessor.Location  = new Point(0, 0);
            preprocessor.Show();
            htmBuilder.MdiParent = this;
            htmBuilder.Location  = new Point(0, preprocessor.Height);
            htmBuilder.Show();
            env.MdiParent = this;
            env.Location  = new Point(preprocessor.Width, 0);
            env.Show();

            //
            this.Log("Image desktop created.");
            initializeButton.Enabled   = true;
            imageDesktopButton.Enabled = false;
            mnistDesktopButton.Enabled = false;
            dataDesktopButton.Enabled  = false;
        }
Example #2
0
        private void dataDesktopButton_Click(object sender, EventArgs e)
        {
            DataEnvironment env = new DataEnvironment(this);

            _agents.Add(env);

/*            IAgent preprocessor = new DataPreprocessor(this);
 *          _agents.Add(preprocessor);*/
            HTMBuilder htmBuilder = new HTMBuilder(this);

            _agents.Add(htmBuilder);
            //preprocessor.InputAgent = env;   // link the preprocessor to the environment
            htmBuilder.InputAgent                    = env; // link the htm builder to the environment
            htmBuilder.RegionWidth                   = 10;
            htmBuilder.RegionHeight                  = 1;
            htmBuilder.MinimumOverlap                = 1;
            htmBuilder.DesiredLocalActivity          = 2;
            htmBuilder.SegmentActivationThreshold    = 1;
            htmBuilder.MinSegmentActivityForLearning = 2;

            // Set the layout
            //preprocessor.MdiParent = this;
            //preprocessor.Location = new Point(0, this.Top + this.Height);
            //preprocessor.Show();
            htmBuilder.MdiParent = this;
            htmBuilder.Location  = new Point(0, 0);
            htmBuilder.Show();
            env.MdiParent = this;
            env.Location  = new Point(htmBuilder.Width, 0);
            env.Show();

            //
            this.Log("Data desktop created.");
            initializeButton.Enabled   = true;
            imageDesktopButton.Enabled = false;
            mnistDesktopButton.Enabled = false;
            dataDesktopButton.Enabled  = false;
        }