cazala / synaptic

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

node.js Neuron: TypeError: from.connected is not a function #265

Open 03l54rd1n3 opened 6 years ago

03l54rd1n3 commented 6 years ago

When using node.js I get the following error on creating an LSTM with the Architect:


[...]\node_modules\synaptic\dist\synaptic.js:308
          var connected = from.connected(to);
                                ^

TypeError: from.connected is not a function
    at Layer.connected ([...]\node_modules\synaptic\dist\synaptic.js:308:33)
    at Layer.project ([...]\node_modules\synaptic\dist\synaptic.js:240:19)
    at new LSTM ([...]\node_modules\synaptic\dist\synaptic.js:2815:30)
    at runNN ([...]\index.js:91:16)
    at Object.<anonymous> ([...]\index.js:51:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3
´´´

Thanks :)
Benzilla commented 6 years ago

Also getting this issue when trying to run the XOR tutorial code in node.js :)

Gregzenegair commented 6 years ago

Hello, I guess you have added new functions to the Array prototype, this may cause your issue. Check for some Array.prototype.yourCustomFunction = function() in your code