Open dfaustryjak opened 7 years ago
You can use the schedule
option to schedule tasks during training. In this example, the error is saved into an array:
var network = new synaptic.Architect.Perceptron(2, 4, 1);
var dataSet = [
{ input: [0,0], output: [0] },
{ input: [0,1], output: [1] },
{ input: [1,0], output: [1] },
{ input: [1,1], output: [0] }
];
var trainer = new synaptic.Trainer(network);
var errors = [];
trainer.train(dataSet, {
log: 1,
iterations: 1000,
schedule: {
every: 1,
do: function(data){
errors.push(data.error);
}
}
});
console.log(errors);
Run it here. So yes, possible ;)
Thanks 👍 my friend for quick help 💃
Hello :)
I would like to graph how much the error decreases and i need to get each value of error fro first to last iteration :) Is it possible ?