/// <summary> /// Generate the network. /// </summary> /// <returns>The generated network.</returns> public BasicNetwork Generate() { ILayer layer = new BasicLayer(new ActivationBiPolar(), true, this.neuronCount); BasicNetwork result = new BasicNetwork(new BoltzmannLogic()); result.SetProperty(BoltzmannLogic.PROPERTY_ANNEAL_CYCLES, this.annealCycles); result.SetProperty(BoltzmannLogic.PROPERTY_RUN_CYCLES, this.runCycles); result.SetProperty(BoltzmannLogic.PROPERTY_TEMPERATURE, this.temperature); result.AddLayer(layer); layer.AddNext(layer); layer.X = PatternConst.START_X; layer.Y = PatternConst.START_Y; result.Structure.FinalizeStructure(); result.Reset(); return(result); }
public BasicNetwork Create() { BasicNetwork network = XOR.CreateTrainedXOR(); XOR.VerifyXOR(network, 0.1); network.SetProperty("test", "test2"); return(network); }
/// <summary> /// Generate the neural network. /// </summary> /// <returns>The generated neural network.</returns> public BasicNetwork Generate() { BasicNetwork network = new BasicNetwork(new ART1Logic()); int y = PatternConst.START_Y; ILayer layerF1 = new BasicLayer(new ActivationLinear(), false, this.InputNeurons); ILayer layerF2 = new BasicLayer(new ActivationLinear(), false, this.OutputNeurons); ISynapse synapseF1toF2 = new WeightedSynapse(layerF1, layerF2); ISynapse synapseF2toF1 = new WeightedSynapse(layerF2, layerF1); layerF1.Next.Add(synapseF1toF2); layerF2.Next.Add(synapseF2toF1); // apply tags network.TagLayer(BasicNetwork.TAG_INPUT, layerF1); network.TagLayer(BasicNetwork.TAG_OUTPUT, layerF2); network.TagLayer(ART1Pattern.TAG_F1, layerF1); network.TagLayer(ART1Pattern.TAG_F2, layerF2); layerF1.X = PatternConst.START_X; layerF1.Y = y; y += PatternConst.INC_Y; layerF2.X = PatternConst.START_X; layerF2.Y = y; network.SetProperty(ARTLogic.PROPERTY_A1, this.A1); network.SetProperty(ARTLogic.PROPERTY_B1, this.B1); network.SetProperty(ARTLogic.PROPERTY_C1, this.C1); network.SetProperty(ARTLogic.PROPERTY_D1, this.D1); network.SetProperty(ARTLogic.PROPERTY_L, this.L); network.SetProperty(ARTLogic.PROPERTY_VIGILANCE, this.Vigilance); network.Structure.FinalizeStructure(); return(network); }
/// <summary> /// Generate the network. /// </summary> /// <returns>The generated network.</returns> public BasicNetwork Generate() { ILayer layer = new BasicLayer(new ActivationBiPolar(), true, this.neuronCount); BasicNetwork result = new BasicNetwork(new BoltzmannLogic()); result.SetProperty(BoltzmannLogic.PROPERTY_ANNEAL_CYCLES, this.annealCycles); result.SetProperty(BoltzmannLogic.PROPERTY_RUN_CYCLES, this.runCycles); result.SetProperty(BoltzmannLogic.PROPERTY_TEMPERATURE, this.temperature); result.AddLayer(layer); layer.AddNext(layer); layer.X = PatternConst.START_X; layer.Y = PatternConst.START_Y; result.Structure.FinalizeStructure(); result.Reset(); return result; }
/// <summary> /// Generate the neural network. /// </summary> /// <returns>The generated neural network.</returns> public BasicNetwork Generate() { BasicNetwork network = new BasicNetwork(new ART1Logic()); int y = PatternConst.START_Y; ILayer layerF1 = new BasicLayer(new ActivationLinear(), false, this.InputNeurons); ILayer layerF2 = new BasicLayer(new ActivationLinear(), false, this.OutputNeurons); ISynapse synapseF1toF2 = new WeightedSynapse(layerF1, layerF2); ISynapse synapseF2toF1 = new WeightedSynapse(layerF2, layerF1); layerF1.Next.Add(synapseF1toF2); layerF2.Next.Add(synapseF2toF1); // apply tags network.TagLayer(BasicNetwork.TAG_INPUT, layerF1); network.TagLayer(BasicNetwork.TAG_OUTPUT, layerF2); network.TagLayer(ART1Pattern.TAG_F1, layerF1); network.TagLayer(ART1Pattern.TAG_F2, layerF2); layerF1.X = PatternConst.START_X; layerF1.Y = y; y += PatternConst.INC_Y; layerF2.X = PatternConst.START_X; layerF2.Y = y; network.SetProperty(ARTLogic.PROPERTY_A1, this.A1); network.SetProperty(ARTLogic.PROPERTY_B1, this.B1); network.SetProperty(ARTLogic.PROPERTY_C1, this.C1); network.SetProperty(ARTLogic.PROPERTY_D1, this.D1); network.SetProperty(ARTLogic.PROPERTY_L, this.L); network.SetProperty(ARTLogic.PROPERTY_VIGILANCE, this.Vigilance); network.Structure.FinalizeStructure(); return network; }