Closed Cpt-Falcon closed 5 years ago
Hello, running a test node script to debug some other code i've written. Here is my script.
const neataptic = require('neataptic'); var network = new neataptic.architect.LSTM(11, 6, 11);
var trainingData = [ { input: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], output: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { input: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], output: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { input: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], output: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] }, { input: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], output: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { input: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], output: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { input: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], output: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { input: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], output: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] }, ]; network.train(trainingData, { log: 500, iterations: 6000, error: 0.03, clear: true, rate: 0.05, }); var results = { "results": [] }; for (var i = 0; i < 10; i++) { var input = output; var output = Math.round(network.activate([input])); results["results"].push(output); }
code always returns null. I'm not sure if i'm doing something wrong but I didn't see any documentations regarding multiple inputs and multiple outputs. Let me know if i'm doing something wrong or if this is a genuine problem. Thanks.
Hello, running a test node script to debug some other code i've written. Here is my script.
const neataptic = require('neataptic'); var network = new neataptic.architect.LSTM(11, 6, 11);
code always returns null. I'm not sure if i'm doing something wrong but I didn't see any documentations regarding multiple inputs and multiple outputs. Let me know if i'm doing something wrong or if this is a genuine problem. Thanks.