示例#1
0
 public KohonenMap(int width, int height, int pattern_length, GPUK_COMPUTATION_TYPE CompType)
 {
     m_Width         = width;
     m_Height        = height;
     m_PatternLength = pattern_length;
     m_CompType      = CompType;
     PA.InitGPU();
     InitMap();
 }
示例#2
0
        public void start()
        {
            init();

            PA.InitGPU();

            dinput  = new DFPA(input);
            doutput = new DFPA(output);

            diwt = new DFPA(iwt);
            dowt = new DFPA(owt);

            while (traincycles-- > 0)
            {
                run();
            }

            cleanup();

            PA.UnInit();
        }
示例#3
0
        /*
         * Entry Function
         */
        public void start()
        {
            /* Initialisation of all layers*/
            init();

            /*Normalisation of weights */
            normali();
            normalo();

            /*Initialisation of GPU*/
            PA.InitGPU();

            /*Measurement starts*/
            QueryPerformanceCounter(ref timbeg);

            diwt = new DFPA(iwt);
            dowt = new DFPA(owt);

            dinput  = new DFPA(input);
            doutput = new DFPA(output);

            /* Minimum permissible error */
            derror = PA.Abs(PA.Multiply(doutput, 0.01f));

            while (traincycles > 0)
            {
                traincycles--;
                numcycles++;
                run();
            }

            long freq = 0;

            /*Measurement ends */
            QueryPerformanceCounter(ref timend);
            QueryPerformanceFrequency(ref freq);
            _timtaken = (timend - timbeg) * 1.0 / freq;
        }