wagenaartje / neataptic

:rocket: Blazing fast neuro-evolution & backpropagation for the browser and Node.js
https://wagenaartje.github.io/neataptic/
Other
1.18k stars 278 forks source link

Error: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2759): TypeError: Cannot read property 'evolve' of undefined #117

Open aleeepp opened 6 years ago

aleeepp commented 6 years ago

Hello, first tnks!!!!, this is the best!!! I am traying to use evolve but, i cant solve the problem , i try for 2 days and search and have nothing.

The problem is:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2759): TypeError: Cannot read property 'evolve' of undefined

And the code is:

` async function networkEvolvejj() {

let results = await this.network.evolve(this.trainingData, { threads: 4, activation: neataptic.methods.activation.LOGISTIC, elitism: 10, equal: true, error: 0.03, iterations: 1000, mutation: neataptic.methods.mutation.FFW, mutationRate: 0.5, popsize: 100 // cost: neataptic.methods.cost.MSE });

}

networkEvolvejj();`

what is the problem, i am a noob whith this I would like studie about deep learning (sorry for my english, i am form argentina)

dan-ryan commented 6 years ago

This part of the error "'evolve' of undefined" seems like this.network is null. I would double check if that was the case.