Search code examples
javaneural-networkencog

Importing weights on Encog Java Library


Is it possible to import weights on an Encog neural network? I know it is possible to export the weights, but in I am constructing a dual neural net system, in which one is trained periodically with data and updates the other, which serves strictly to generate an output. Is it possible to adjust the weights of the non-training network by specifying the actual values? Thanks!


Solution

  • I haven't tried it myself but it looks like you can use the network.setWeight(int fromLayer, int fromNeuron, int toNeuron, double value) method to set individual neuron weights, so you'd have to iterate over all neurons you want to update.