fromJSON does not work with LSTM
See original GitHub issueI’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:
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?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
brain.js problem with importing LSTM network from json
After looking at your training data, it looks like rows/columns are properties in an object called 'input'. Is it possible that you need...
Read more >Using a JSON dataset for lstm - Data Science Stack Exchange
But I have to run a json dataset where I have to add this output for each review in the json file. Can...
Read more >Useful LSTM network example using brain.js
Problem They say every problem has a solution (not necessarily). ... create here an instance of LSTM network and call fromJSON() method.
Read more >Save and load Keras models | TensorFlow Core
When would you use one or the other, and how do they work? ... Delete the custom-defined model class to ensure that the...
Read more >brain.js - npm
js from npm should just work. However, if you run into problems, this mean prebuilt binaries are not able to download from github...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reproduced. Great find @felangel and everyone who worked on this. Merging now, and will have a new version out within the next 10 minutes.
The same here, the issue appears when exportinf/importing to/from JSON. For example:
Returns