public static BasicNetwork CreateNetwork() { var pattern = new FeedForwardPattern {InputNeurons = 3}; pattern.AddHiddenLayer(50); pattern.OutputNeurons = 1; pattern.ActivationFunction = new ActivationTANH(); var network = (BasicNetwork) pattern.Generate(); network.Reset(); return network; }
private IMLMethod CreateFeedforwardNetwork() { // construct a feedforward type network FeedForwardPattern pattern = new FeedForwardPattern(); pattern.ActivationFunction = new ActivationSigmoid(); pattern.InputNeurons = 1; pattern.AddHiddenLayer(6); pattern.OutputNeurons = 1; return pattern.Generate(); }
public static BasicNetwork createNetwork() { var pattern = new FeedForwardPattern { InputNeurons = (Board.SIZE * Board.SIZE) }; pattern.AddHiddenLayer (NEURONS_HIDDEN_1); pattern.OutputNeurons = 1; pattern.ActivationFunction = new ActivationTANH (); var network = (BasicNetwork)pattern.Generate (); network.Reset (); return network; }
/// <summary> /// Creates the feedforward network. /// </summary> /// <param name="inputsize">The inputsize.</param> /// <param name="outputsize">The outputsize.</param> /// <param name="hiddenlayers">The hiddenlayers.</param> /// <param name="hidden2Layers">The hidden2layers.</param> /// <returns></returns> public static BasicNetwork CreateFeedforwardNetwork(int inputsize, int outputsize, int hiddenlayers, int hidden2Layers) { // construct an Elman type network var pattern = new FeedForwardPattern {ActivationFunction = new ActivationTANH(), InputNeurons = inputsize}; pattern.AddHiddenLayer(hiddenlayers); pattern.AddHiddenLayer(hidden2Layers); pattern.OutputNeurons = outputsize; IMLMethod network = pattern.Generate(); return (BasicNetwork) network; }
private static IMLMethod CreateFeedforwardNetwork(int inputs, int outputs, int hidden) { // construct a feedforward type network var pattern = new FeedForwardPattern(); pattern.ActivationFunction = new ActivationSigmoid(); pattern.InputNeurons = inputs; pattern.AddHiddenLayer(hidden); pattern.OutputNeurons = outputs; return pattern.Generate(); }
/// <summary> /// Create a simple feedforward neural network. /// </summary> /// <param name="input">The number of input neurons.</param> /// <param name="hidden1">The number of hidden layer 1 neurons.</param> /// <param name="hidden2">The number of hidden layer 2 neurons.</param> /// <param name="output">The number of output neurons.</param> /// <param name="tanh">True to use hyperbolic tangent activation function, false to /// use the sigmoid activation function.</param> /// <returns>The neural network.</returns> public static BasicNetwork SimpleFeedForward(int input, int hidden1, int hidden2, int output, bool tanh) { var pattern = new FeedForwardPattern {InputNeurons = input, OutputNeurons = output}; if (tanh) { pattern.ActivationFunction = new ActivationTANH(); } else { pattern.ActivationFunction = new ActivationSigmoid(); } if (hidden1 > 0) { pattern.AddHiddenLayer(hidden1); } if (hidden2 > 0) { pattern.AddHiddenLayer(hidden2); } var network = (BasicNetwork) pattern.Generate(); network.Reset(); return network; }