Closed BRD-E closed 6 years ago
You are not using Trainer
as supposed. Please read through the wiki here and come back for any questions:
https://github.com/cazala/synaptic/wiki/Trainer
A trainer is an object, so you have to start training it with myTrainer.train(dataSet, options)
.
You have to start the trainer using the "train" method: myTrainer.train(dataSet, options)
var TrainerSettings = { rate: .1, iterations: 20000, error: .00000000005, shuffle: true, log: 100, cost: Trainer.cost.CROSS_ENTROPY, schedule: { every: 500, // repeat this task every 500 iterations do: function(data) { // custom log console.log("error", data.error, "iterations", data.iterations, "rate", data.rate); if (someCondition) return true; // abort/stop training } } } myPerceptron = new Perceptron(2,4,1); var myTrainer = new Trainer(myPerceptron, TrainerSettings); console.log(myTrainer) console.log(myTrainer.XOR()); // { error: 0.004998819355993572, iterations: 21871, time: 356 }
I thought every 100 iterations, it would display { error: 0.004998819355993572, iterations: 21871, time: 356 }`for the log optionFor the schedule option, it should read off something like "error", data.error, "iterations", data.iterations, "rate", data.rate every 500 iterations.
Am I using this wrong? Is this a known bug? Any idea how I could get this working? Thank you for your time.