public NetworkBuilder SetupUnorthodoxStructure() { _hasUnorthodox = true; _inputUnorthodoxUnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.InputUnit); InputUnorthodox = CreateUnit(_inputUnorthodoxUnitActivationTrainingFake); InputUnorthodox.UnitActivation.Properties.Name = "InputUnorthodox"; InputUnorthodoxActivation = 0.5d; InputUnorthodoxToOutput1 = CreateConnection(InputUnorthodox, Output1); InputUnorthodoxToOutput1.Properties.Name = "InputUnorthodoxToOutput1"; InputUnorthodoxToOutput1.Properties.Weight = 0.432d; InputUnorthodoxToHidden1 = CreateConnection(InputUnorthodox, Hidden1); InputUnorthodoxToHidden1.Properties.Name = "InputUnorthodoxToHidden1"; InputUnorthodoxToHidden1.Properties.Weight = 0.21d; return(this); }
public NetworkBuilder Setup() { _input1UnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.InputUnit) { IsInput = true }; Input1 = CreateUnit(_input1UnitActivationTrainingFake); Input1.UnitActivation.Properties.Name = "Input1"; _input2UnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.InputUnit) { IsInput = true }; Input2 = CreateUnit(_input2UnitActivationTrainingFake); Input2.UnitActivation.Properties.Name = "Input2"; _hidden1UnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.NormalUnit); Hidden1 = CreateUnit(_hidden1UnitActivationTrainingFake); Hidden1.UnitActivation.Properties.Name = "Hidden1"; _hidden2UnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.NormalUnit); Hidden2 = CreateUnit(_hidden2UnitActivationTrainingFake); Hidden2.UnitActivation.Properties.Name = "Hidden2"; _output1UnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.NormalUnit); Output1 = CreateUnit(_output1UnitActivationTrainingFake); Output1.UnitActivation.Properties.Name = "Output1"; _output2UnitActivationTrainingFake = new UnitActivationTrainingFake(UnitType.NormalUnit); Output2 = CreateUnit(_output2UnitActivationTrainingFake); Output2.UnitActivation.Properties.Name = "Output2"; ConnectionInput1Hidden1 = CreateConnection(Input1, Hidden1); ConnectionInput1Hidden1.Properties.Name = "ConnectionInput1Hidden1"; ConnectionInput1Hidden2 = CreateConnection(Input1, Hidden2); ConnectionInput1Hidden1.Properties.Name = "ConnectionInput1Hidden2"; ConnectionInput2Hidden1 = CreateConnection(Input2, Hidden1); ConnectionInput1Hidden1.Properties.Name = "ConnectionInput2Hidden1"; ConnectionInput2Hidden2 = CreateConnection(Input2, Hidden2); ConnectionInput1Hidden1.Properties.Name = "ConnectionInput2Hidden2"; ConnectionHidden1Output1 = CreateConnection(Hidden1, Output1); ConnectionInput1Hidden1.Properties.Name = "ConnectionHidden1Output1"; ConnectionHidden1Output2 = CreateConnection(Hidden1, Output2); ConnectionInput1Hidden1.Properties.Name = "ConnectionHidden1Output2"; ConnectionHidden2Output1 = CreateConnection(Hidden2, Output1); ConnectionInput1Hidden1.Properties.Name = "ConnectionHidden2Output1"; ConnectionHidden2Output2 = CreateConnection(Hidden2, Output2); ConnectionInput1Hidden1.Properties.Name = "ConnectionHidden2Output2"; Output1Activation = 0.9d; Output2Activation = 0.7d; Hidden1Activation = 1.2d; Hidden2Activation = 1.4d; Input1Activation = 0.2d; Input2Activation = 0.3d; Input1.UnitActivation.Properties.NetInput = Input1Activation; Input2.UnitActivation.Properties.NetInput = Input2Activation; ConnectionInput1Hidden1.Properties.Weight = 0.1; ConnectionInput1Hidden2.Properties.Weight = 0.2; ConnectionInput2Hidden1.Properties.Weight = 0.3; ConnectionInput2Hidden2.Properties.Weight = 0.4; ConnectionHidden1Output1.Properties.Weight = 0.5; ConnectionHidden1Output2.Properties.Weight = 0.6; ConnectionHidden2Output1.Properties.Weight = 0.7; ConnectionHidden2Output2.Properties.Weight = 0.8; Output1Error = 1.7d; Output2Error = 1.6d; Hidden1Error = 1.2d; Hidden2Error = 1.3d; Output1Derivative = 2d; Output2Derivative = 3d; Hidden1Derivative = 0.6d; Hidden2Derivative = 0.7d; return(this); }
private static ITraversableUnit <IUnitUnderTraining, IConnectionUnderTraining, IUnitActivationTraining> CreateUnit(UnitActivationTrainingFake unitActivationTraining) { return(TraversableUnit <IUnitUnderTraining, IConnectionUnderTraining, IUnitActivationTraining> .CreateUnit <UnitUnderTraining, UnitActivationTrainingFake>(unitActivationTraining)); }