Пример #1
0
        Dictionary <string, MMNode> createModels(List <MMNodeFactory.Model> modelsToTrain)
        {
            Dictionary <string, MMNode> models = new Dictionary <string, MMNode>();

            int neuronsCount = 50;

            //for (int neuronsCount = 10; neuronsCount < 100; neuronsCount += 20)
            {
                foreach (MMNodeFactory.Model selectedModel in modelsToTrain)
                {
                    //Create the model
                    //MNNodeFactory.Model selectedModel;
                    //Enum.TryParse<MNNodeFactory.Model>(uncastedMdl.ToString(), out selectedModel);
                    models[selectedModel.ToString() + "_" + neuronsCount] = MMNodeFactory.obtain(selectedModel, neuronsCount);

                    MMNode network = models[selectedModel.ToString() + "_" + neuronsCount];
                    network.onEpoch += network_onEpoch;
                    //network.addModality( new Signal(2,1), "XY-t0");
                    //network.addModality( new Signal(2,1), "XY-t1");
                    network.addModality(new Signal(retinaSize * 4, retinaSize), "Vision-t0-Color");
                    network.addModality(new Signal(retinaSize * 2, retinaSize), "Vision-t0-Orientation");
                    //network.addModality(new Signal(retinaSize * 4, retinaSize), "Vision-t0-Shape");
                    network.addModality(new Signal(4, 1), "Saccade");
                    network.addModality(new Signal(retinaSize * 4, retinaSize), "Vision-t1-Color");
                    network.addModality(new Signal(retinaSize * 2, retinaSize), "Vision-t1-Orientation");
                    //network.addModality(new Signal(retinaSize * 4, retinaSize), "Vision-t1-Shape");

                    //Apply a treshold function on the modalities
                    network.onDivergence += network_onDivergence;
                }
            }
            return(models);
        }
Пример #2
0
        //Thread
        //public Thread mainLoopThread;

        public ModalPx()
        {
            InitializeComponent();

            //Generate the world
            world = new World(worldWidth, worldHeight, shapeCount, orientationVariability);
            world.Randomize(seedsNumber);
            getWorldVisualization();

            //Generate the network
            //1-Areas
            CA3 = MMNodeFactory.obtain(modelUsed);

            //2-Inputs
            LEC_Color = new Signal[retinaSize, retinaSize];
            for (int i = 0; i < retinaSize; i++)
            {
                for (int j = 0; j < retinaSize; j++)
                {
                    LEC_Color[i, j] = new CDZNET.Core.Signal(4, 1);
                    CA3.addModality(LEC_Color[i, j], "Color_" + i + "_" + j);
                }
            }

            //Gui purpose
            ctrlCA3.attach(CA3);
        }
Пример #3
0
        //Thread
        //public Thread mainLoopThread;

        public MainWindow()
        {
            InitializeComponent();

            //Generate the world
            world = new World(worldWidth, worldHeight, shapeCount, orientationVariability);
            world.Randomize(seedsNumber);
            getWorldVisualization();

            //Generate the network
            //1-Inputs
            LEC_Color       = new CDZNET.Core.Signal(retinaSize * 4, retinaSize);  //Visual matrix (RED=0001 / BLUE=0010 / GREEN=0100 / YELLOW=1000)
            LEC_Orientation = new CDZNET.Core.Signal(retinaSize * 2, retinaSize);  //Visual matrix (an orientation is encoded on 2 bits)
            LEC_Shape       = new CDZNET.Core.Signal(retinaSize, retinaSize);      //Visual matrix
            MEC             = new CDZNET.Core.Signal(worldWidth + worldHeight, 1); //Proprioception/Grid Cells

            //2-Areas
            CA3 = MMNodeFactory.obtain(modelUsed);

            //Define which signal will enter CA3
            CA3.addModality(LEC_Color, "Color");
            CA3.addModality(LEC_Orientation, "Orientation");
            //CA3.addModality(LEC_Shape, "Shape");
            CA3.addModality(MEC, "XY");

            //Gui purpose
            ctrlCA3.attach(CA3);

            //mainLoopThread = new Thread(mainLoop);
            //mainLoopThread.Start();
        }
Пример #4
0
        //Thread
        //public Thread mainLoopThread;

        public Saccades()
        {
            InitializeComponent();

            //Generate the world
            world = new World(worldWidth, worldHeight, shapeCount, orientationVariability);
            world.Randomize(seedsNumber);
            getWorldVisualization();

            //Generate the network
            //1-Inputs
            LEC_ColorT0 = new CDZNET.Core.Signal(retinaSize * 4, retinaSize); //Visual matrix (RED=0001 / BLUE=0010 / GREEN=0100 / YELLOW=1000)
            LEC_ColorT1 = new CDZNET.Core.Signal(retinaSize * 4, retinaSize); //Visual matrix (RED=0001 / BLUE=0010 / GREEN=0100 / YELLOW=1000)

            MEC = new CDZNET.Core.Signal(4, 1);
            //dX dY
            //Right = 0 1 0 0
            //Left  = 1 0 0 0
            //Up    = 0 0 0 1
            //Down  = 0 0 1 0

            //2-Areas
            CA3 = MMNodeFactory.obtain(modelUsed);

            //Define which signal will enter CA3
            CA3.addModality(LEC_ColorT0, "ColorT0");
            CA3.addModality(LEC_ColorT1, "ColorT1");
            //CA3.addModality(LEC_Shape, "Shape");
            CA3.addModality(MEC, "dXdY");

            //Gui purpose
            ctrlCA3.attach(CA3);

            //mainLoopThread = new Thread(mainLoop);
            //mainLoopThread.Start();
        }