I've got a problem with my neural net and I really need your help.
When the network is training, it gets me this output:
iterations: 10, training error: NaN
iterations: 20, training error: NaN
and so on...
I've tried so far:
- to use for training only data with output 0 or 1
- to normalize data
- to flatten the input
Here is my training data.
Here is my code:
const Brain = require('brain.js'),
fs = require('fs'),
config = {
logPeriod: 10,
log: true,
iterations: 100
};
let trainingData = JSON.parse(fs.readFileSync('./data/trainingData.normalized.json', 'utf8'));
const net = new Brain.NeuralNetwork({
hiddenLayers: [72, 72]
});
net.train(trainingData, config);
console.log(net.run(trainingData[0].input));
Any help will be appreciated!