Skip to content

fromJSON does not work with LSTM #299

@Enitoni

Description

@Enitoni

I'm trying to use a LSTM network to just feed messages from a discord server, as a fun experiment to see what it can come up with. The problem is when I save the data using toJSON and then restoring it, it seems like the data is incompatible with what fromJSON expects.

const network = new brain.recurrent.LSTM();
const data = await getDataSomehow()

network.fromJSON(data)

getDataSomehow loads the json file, parses it and returns the object.
After doing this, this error is put in console whenever run is called:
image

Furthermore, when I try training with new data, if it encounters a character that was not in the original training data, it gives me Unrecognized character.

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions