mysamai / natural-brain

A natural language classifier using Node Natural with a BrainJS neural network
MIT License
320 stars 29 forks source link

Restore isn't working expected #14

Closed cagataycali closed 7 years ago

cagataycali commented 7 years ago

Hi there, I'm in love with your natural brain lib. I think I found a little but critical bug in your code.

I try restore my trained output, (node:2088) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'brain' of undefined

cagataycali commented 7 years ago

Oh, I got it, This worked for me BrainJSClassifier.restore(JSON.parse(fs.readFileSync('./data.json', 'utf8')));