question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'LSTM' of undefined

See original GitHub issue

Hello,

I just try the following example :

var brain = require('brainjs')

net = new brain.recurrent.LSTM();

net.train([
    'doe, a deer, a female deer',
    'ray, a drop of golden sun',
    'me, a name I call myself',
  ]);
  
var output = net.run('doe'); 

console.log(output)

But I get the following error :

TypeError: Cannot read property 'LSTM' of undefined

How can I solve this ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iplanwebsitescommented, Oct 21, 2021

The issue (TypeError: Cannot read property 'LSTM' of undefined) seems to be back in the latest version (2.0.0-beta.2 is working fine). Did the syntax for strings change?

1reaction
mylittleneurondotcomcommented, Jul 31, 2018

Thanx, it works !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property LSTM | Sololearn: Learn to code for ...
I believe that means that “brain.recurrent” is returning undefined, and as such you can't access LSTM of undefined with the statement “brain.recurrent.LSTM”.
Read more >
brain-js/Lobby - Gitter
I have tried including all files, but it's not happy: Uncaught TypeError: Cannot read property 'LSTMTimeStep' of undefined. _. Robert Plummer.
Read more >
Cannot read property 'weights' of undefined in Brain.js - Stack ...
I am currently working with the Brain.js library and I have encountered the following error when executing my prediction. I have no idea...
Read more >
brain.js - npm
Neural networks in JavaScript. Latest version: 2.0.0-beta.17, last published: a month ago. Start using brain.js in your project by running ...
Read more >
[Solved]-Why this brain.js script is going too laggy?-node.js
LSTM() net.train([ 'doe, a deer, a female deer', 'ray, a drop of golden ... Why do I get this error TypeError: Cannot read...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found