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

problem with myNetwork.activate([0, 0]) #278

Open MohamadAlissa opened 6 years ago

MohamadAlissa commented 6 years ago

thank you for the library. I have a problem with myNetwork.activate I have neural network with 2 inputs, 5 hidden layers and one output ,and I am trying to train my network by change the weights every times by using inputLayer.connectedTo[0].connections[key].weight = value hiddenLayer.connectedTo[0].connections[key].weight = value but the myNetwork.activate gives me the same result every time I change the weights it seems it does not read the new weights can you tell me how I can calculate the new output after change the wrights?

bashz commented 6 years ago

Would you please post a snippet, that will be helpful.

termxz commented 5 years ago

If you're trying to change the weights of the connections you have to call inputLayer.project() with the weight value.

inputLayer.project(hiddenLayer, Layer.connectionType.ALL_TO_ALL, WEIGHT VALUE HERE)