Open irnc opened 7 years ago
Was mentioned here too - https://github.com/cazala/synaptic/issues/26.
Might be because of the 100 fps?
What about using the window.requestAnimationFrame function instead of the setTimeout?
https://github.com/cazala/synaptic/blob/gh-pages/scripts/homepage/world.js#L83
@AlexisTM I wrote a JSFiddle of the demo that uses requestAnimationFrame
instead of setTimeout
, problem still occured. https://jsfiddle.net/wagenaartje/fuh36aex/1/.
I also set the setTimeout delay to 1000 and it worked fine for like 5 iterations and then just completely slowed down, but did not freeze.
If you leave the page during some time, it actually works after a long freeze.
It took 134200 seconds for the first execution of the activate function, which optimize.
https://github.com/cazala/synaptic/blob/gh-pages/scripts/homepage/world.js#L71
var output = creature.network.activate(input);
The optimization creates an optimized version of the network by concatenating the calls.
https://github.com/cazala/synaptic/blob/master/src/network.js#L114-L191
Nice catch! I used setOptimize(false)
and it worked again.
https://jsfiddle.net/wagenaartje/4516xtze/7/
I also noticed that the perceptron has way too many neurons in its hidden layer. Could easily be reduced. Just 1 is enough for clustering, 2 is more smooth.
Therefore, the optimization is hanging on Chrome. :(
https://synaptic.juancazala.com/ hangs right away leaving it unusable, because links couldn't be clicked.
System is Ubuntu 16.04 with Chrome 59.