public virtual INeuralNetwork CreateNeuralNetwork(int inputNodes, int hiddenNodes, int staticWeights=0) { var wrapper = new AForgeNeuralNetwork(inputNodes, hiddenNodes,staticWeights); wrapper.Randomize(); return wrapper; }
/// <summary> /// Initialise to random values, implemented by generating a new network and extracting the relevant weights /// </summary> /// <returns></returns> private double[] DefaultNeuronWeights() { double[] weights = null; var net = new AForgeNeuralNetwork(MorphoSyntacticContext.VectorLength + MorphoSyntacticContext.VectorLength, MorphoSyntacticContext.VectorLength); net.Randomize(); net.Theta.SaveTo(ref weights); return weights; }