cazala / synaptic

architecture-free neural network library for node.js and the browser
http://caza.la/synaptic
Other
6.92k stars 665 forks source link

Shuffle and shuffleInplace(o) #238

Open derkeNuke opened 7 years ago

derkeNuke commented 7 years ago

Hi,

The option shuffle:true still does not work for me (even after the change of Jonas Raoni Soares Silva). I get an error like this:

blob:null/1a2bb8ac-eef5-4e74-bee2-0edbad2fd7de:105 Uncaught ReferenceError: shuffleInplace is not defined

If I inspect the blob:null/1a2bb8ac-eef5-4e74-bee2-0edbad2fd7de:105, it seems that the function shuffleInplace does not exist, is not in this part of the code, and does not affect if I define it by myself in my js file.

Regards.

leomendoza123 commented 7 years ago

My temporal fix is to set the train option shuffle to false.


 let trainResult = trainer.trainAsync( trainSet
      , {
        rate: .001,
        error: 0.01,
        iterations: 150000,
        shuffle: false, //             <<<<< FALSE 
        cost: Trainer.cost.CROSS_ENTROPY,
      }
    )
sam-g-steel commented 6 years ago

@cazala @derkeNuke I'm looking at submitting a pull request to resolve this issue.