Inheritance: LenetWrapper
Exemple #1
0
        int totalEpochCount; // for train event

        #endregion Fields

        #region Constructors

        public LenetClassifier()
        {
            DRandomizer.Default.init_drand(DateTime.Now.Millisecond);
            //LenetWrapper.StartRedirectStdout();
            // Char Class
            CharClass = new AutoLenetWrapper();
            CharClass.TrainRound += new TrainEventHandler(CharClass_TrainRound);
            // Junk Class
            JunkClass = new AutoLenetWrapper();
            JunkClass.TrainRound += new TrainEventHandler(JunkClass_TrainRound);

            PDef("junkchar", (int)'~', "junk character");
            PDef("junk", 1, "train a separate junk classifier");
            PDef("epochs", 10, "number of training epochs");
            junkchar = -1;
            Persist(new LenetIOWrapper(CharClass, "CharClass"), "charclass");
            Persist(new LenetIOWrapper(JunkClass, "JunkClass"), "junkclass");
        }
        int totalEpochCount;    // for train event

        public LenetClassifier()
        {
            DRandomizer.Default.init_drand(DateTime.Now.Millisecond);
            //LenetWrapper.StartRedirectStdout();
            // Char Class
            CharClass             = new AutoLenetWrapper();
            CharClass.TrainRound += new TrainEventHandler(CharClass_TrainRound);
            // Junk Class
            JunkClass             = new AutoLenetWrapper();
            JunkClass.TrainRound += new TrainEventHandler(JunkClass_TrainRound);

            PDef("junkchar", (int)'~', "junk character");
            PDef("junk", 1, "train a separate junk classifier");
            PDef("epochs", 10, "number of training epochs");
            junkchar = -1;
            Persist(new LenetIOWrapper(CharClass, "CharClass"), "charclass");
            Persist(new LenetIOWrapper(JunkClass, "JunkClass"), "junkclass");
        }