cazala / synaptic

architecture-free neural network library for node.js and the browser
http://caza.la/synaptic
Other
6.92k stars 666 forks source link

capture iteration and error #334

Open nnnnnnnnnn3 opened 5 years ago

nnnnnnnnnn3 commented 5 years ago

i try get the iteration and error with this code

let errors=[];
        trainer.train(trainingSet, {
            rate: getParametersAnn(tipo,parametros).lr,//0.003
            iterations: 20000,
            error:getParametersAnn(tipo,parametros).error,//0.005
            shuffle: true,
            log: 10,
            cost: synaptic.Trainer.cost.CROSS_ENTROPY,
            schedule: {
                every: 1000,
                do: function(data){
                    console.log('errors',data);
                    errors.push(data.error);
                }
            }
        });

but never enters, does not show the console