Is the trainAsync method available for LSTM?
See original GitHub issueWhat is wrong?
trainAsync not available for LSTM?
Where does it happen?
- macOS v10.15.3
- VScode v1.43.2
- node v12.16.1
- brainjs v2.0.0-alpha.12
How do we replicate the issue?
(1.)
const brain = require('brain.js')
const network = new brain.recurrent.LSTM()
const jsonfileReader = require('jsonfile')
var mappedTrainingData = await jsonfileReader
.readFile(trainingDataPath)
.then(res => {
console.log('File loaded!')
console.log('Mapping training data...')
return res.map(elm => ({
input: elm.title,
output: elm.type
}))
})
.then(res => {
console.log('Mapping completed!')
return res
})
.catch(error =>
console.error(`ERROR: Error reading training data file: ${error}`)
)
console.log('Training network...')
network
.trainAsync(mappedTrainingData)
.then(res => {
console.log('Training completed!')
networkJSON = network.toJSON()
})
How important is this (1-5)?
2
Expected behavior (i.e. solution)
It would be great if async training is available for the other modes besides NeuralNetwork as well.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
10 Hyperparameters to keep an eye on for your LSTM model
A pro move is to employ the early stopping method to first specify a large number of training epochs and stop training once...
Read more >brain.js - npm
For training with NeuralNetwork; For training with RNNTimeStep , LSTMTimeStep and GRUTimeStep; For training with RNN , LSTM and GRU.
Read more >Time Series Prediction with LSTM Recurrent Neural Networks ...
With time series data, the sequence of values is important. A simple method that you can use is to split the ordered dataset...
Read more >LSTM: How To Train Neural Networks to Write like Lovecraft
In order to train an LSTM Neural Network to generate text, we must first preprocess our text data so that it can be...
Read more >Application of Long Short-Term Memory (LSTM) Neural ...
As a result, models do not gain good performance especially in areas where available data is limited. Moreover, process-based methods have limitations ...
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
@jennasisis Thx again, worked like a charm. For anyone working on this here is my code:
parent.js
child.js
Thanks @saschamander for your example. I’ve tried several times to get this working in LSTM, without success because of the complexity of the net. This I think will be a standard feature of both
FeedForward
andRecurrent
classes when they reach stability.