public IImageClassifier GetClassifier(ImageClassifierConfiguration configuration)
        {
            if (configuration.ClassifierType == "MNISTClassifier")
            {
                return(new MnistImageClassifier(configuration));
            }

            throw new UnknownClassifierTypeException(configuration.ClassifierType);
        }
Ejemplo n.º 2
0
 public ImageClassifierWorkerPool(IImageClassifierFactory factory, ImageClassifierConfiguration configuration,
                                  int workersAmount)
 {
     _roundRobinCounter = 0;
     _workers           = new List <IImageClassifierWorker>();
     for (var i = 0; i < workersAmount; ++i)
     {
         _workers.Add(new ImageClassifierWorker(factory.GetClassifier(configuration)));
     }
 }
 public MnistImageClassifier(ImageClassifierConfiguration configuration)
 {
     _configuration = configuration;
 }