Exemplo n.º 1
0
        public void CanRunBatchTrainer()
        {
            Layer layer = new Layer(new double[, ] {
                { 1, 1 }
            }, new double[] { 0 }, TrainableNetworkComponent.TrainingMode.ONLINE);
            List <TrainingVector> trainingVectors = new List <TrainingVector>
            {
                new TrainingVector(
                    new NetworkVector(new double[] { 0, 0 }),
                    new NetworkVector(new double[] { 1 })
                    )
            };

            BatchTrainer trainer = new BatchTrainer(layer, trainingVectors);

            trainer.Train();
        }
Exemplo n.º 2
0
        public void CanMakeBatchTrainer()
        {
            Layer layer = new Layer(new double[, ] {
                { 1, 1 }
            });
            List <TrainingVector> trainingVectors = new List <TrainingVector>
            {
                new TrainingVector(
                    new NetworkVector(new double[] { 1, 1 }),
                    new NetworkVector(new double[] { 1 })
                    )
            };

            BatchTrainer trainer = new BatchTrainer(layer, trainingVectors);

            Assert.AreNotEqual(null, trainer);
        }
        public ActionResult Create(BatchTrainer batchTrainer)
        {
            var result = NidanBusinessService.CreateBatchTrainer(UserOrganisationId, batchTrainer);

            return(this.JsonNet(result));
        }