+ 2

Brain.js slow recurrent LSTM

I have the following code let brain = require('brain.js'); let timeStamp = Date.now(); let net = new brain.recurrent.LSTM(); net.train([ {input: "Hello", output: "Hi!"}, {input: "How are you?", output: "I am good!"}, {input: "Where are you?", output: "I am somewhere"} ], { log: true}); console.log("training took ",((Date.now()-timeStamp)/1000).toFixed(2),"seconds"); timeStamp = Date.now(); console.log(net.run("Hello!")); console.log("Run took ",((Date.now()-timeStamp)/1000).toFixed(2),"seconds"); The problem is, it takes too much time to train! and up to 15-20 minutes in my PC How to solve this, without changing the number of iterations and learning rate?

21st Mar 2020, 1:53 PM
Sarthak 🇳🇵
Sarthak 🇳🇵 - avatar
1 Answer
+ 1
It's a good question
28th Mar 2020, 7:27 AM
manveer singh
manveer singh - avatar