brain.js icon indicating copy to clipboard operation
brain.js copied to clipboard

Cannot read properties of undefined LSTM

Open Whesu opened this issue 1 year ago • 2 comments

It works well in my browser (outside node environment) only with numerical data(arrays) but the string method does not work which returns Cannot read properties of undefined LSTM.

Any reason why this fails? Thanks.

Whesu avatar Jun 10 '23 20:06 Whesu

It sounds like you forgot to import the LSTM class:

import { recurrent } from 'brain.js'
const net = new recurrent.LSTM()

Vectorrent avatar Jun 29 '23 03:06 Vectorrent

It sounds like you forgot to import the LSTM class:

import { recurrent } from 'brain.js'
const net = new recurrent.LSTM()

Expanding on @LuciferianInk (🤘)'s comment, if you can provide an abbreviated snippet of your code -- at least your imports -- we can get you squared.

But all of the recurrent implementations can be accessed with the above import statement.

skulldoggery avatar Jul 18 '23 01:07 skulldoggery