GetStdout() public method

public GetStdout ( StringBuilder &sbout ) : void
sbout StringBuilder
return void
Beispiel #1
0
        public void TestRecognize()
        {
            LenetClassifier classifier = new LenetClassifier();
            classifier.Load(networkFileName);

            StringBuilder sbout;
            classifier.GetStdout(out sbout);
            Console.Write(sbout);

            DoTestRecognize(classifier);
        }
Beispiel #2
0
        public void TestTrainSimple()
        {
            // create lenet
            LenetClassifier classifier = new LenetClassifier();
            classifier.Set("junk", 0);      // disable junk
            classifier.SetExtractor("scaledfe");
            classifier.Initialize(classesNums);

            StringBuilder sbout;
            classifier.GetStdout(out sbout);
            Console.Write(sbout);

            // load RowDataset8 from file
            RowDataset8 ds = new RowDataset8();
            ds.Load(trainDatasetFileName);

            // do train
            classifier.Set("epochs", 3);
            classifier.XTrain(ds);

            // save classifier to file
            classifier.Save(trainNetworkFileName);

            // test recognize
            DoTestRecognize(classifier);
        }