Open wagenaartje opened 7 years ago
Hello ! I have de same problem with LSTM :( Please help !
I tried with this simple example and it didn't work
var myNetwork = new synaptic.Architect.LSTM(2,1,1)
var trainer = new synaptic.Trainer(myNetwork);
trainer.XOR();
var standalone = myNetwork.standalone();
console.log(myNetwork.activate([1,0]));
console.log(standalone([1,0]));
Result : [ 0.9127302571342819 ] [ 0.05599734668225011 ]
However when i tried after adding a new layer (var myNetwork = new synaptic.Architect.LSTM(2,1,1,1)) it worked. I think there is a problem with layer counting. There is also a comment in the source code, in standalone's definition questioning layer's count.
Hmmm. Then it's a double bug. So there's 2 problems: it doens't work for recurrent networks and something is going wrong with layer counting. I shouldn't be saying this, but this library also supports LSTM networks with standalone()
and it should be working fine.
The standalone function doesn't seem to work for LSTM's. The output of the standalone function is completely static. I think this is because the function actually has an array with values which it seems to reset.
See for yourself (open console)