Can't train brain js with huge data

108 Views Asked by At

I'm trying to make image recognition and localization with brain js

my training data is like this

var trainData = [
    {input: [(an array with 29400 float data the value is either 0 , 1 or 0.5)], output: [1]}
];

i just train it with only 1 object data

i did train my data and everytime i load the page it won't respond

i also tried to train using array with rougly 300 float data and it works fine

i don't know if the problem is in my code or is it in brain js, because i've seen people train with huge data and they're fine

NOTE: there is no problem in ajax

Here is my code

window.addEventListener("load",function(){  
    
const net = new brain.NeuralNetwork();


$.get("db.txt",function(res){

    var data = JSON.parse(res);

    var trainingData = res;

    net.train(trainData);

});


});
0

There are 0 best solutions below