public void Complex_WeightOne() { var connList = new LightweightList <WeightedDirectedConnection <double> > { new WeightedDirectedConnection <double>(0, 4, 1.0), new WeightedDirectedConnection <double>(1, 4, 1.0), new WeightedDirectedConnection <double>(1, 5, 1.0), new WeightedDirectedConnection <double>(3, 4, 1.0), new WeightedDirectedConnection <double>(4, 2, 0.9), new WeightedDirectedConnection <double>(5, 3, 1.0) }; var connSpan = connList.AsSpan(); // Create graph. var digraph = WeightedDirectedGraphAcyclicBuilder <double> .Create(connSpan, 2, 2); // Create neural net and run tests. var actFn = new Logistic(); var net = new NeuralNetAcyclic(digraph, actFn.Fn); Complex_WeightOne_Inner(net, actFn); // Create vectorized neural net and run tests. var vnet = new NeuralNets.Double.Vectorized.NeuralNetAcyclic(digraph, actFn.Fn); Complex_WeightOne_Inner(vnet, actFn); }
public void SingleInput_WeightOne() { var connList = new List <WeightedDirectedConnection <double> > { new WeightedDirectedConnection <double>(0, 1, 1.0) }; // Create graph. var digraph = WeightedDirectedGraphAcyclicBuilder <double> .Create(connList, 1, 1); // Create neural net and run tests. var actFn = new Logistic(); var net = new NeuralNetAcyclic(digraph, actFn.Fn); SingleInput_WeightOne_Inner(net, actFn); // Create vectorized neural net and run tests. var vnet = new NeuralNets.Double.Vectorized.NeuralNetAcyclic(digraph, actFn.Fn); SingleInput_WeightOne_Inner(vnet, actFn); }
public void TwoInputs_WeightHalf() { var connList = new List <WeightedDirectedConnection <double> > { new WeightedDirectedConnection <double>(0, 2, 0.5), new WeightedDirectedConnection <double>(1, 2, 0.5) }; // Create graph. var digraph = WeightedDirectedGraphAcyclicBuilder <double> .Create(connList, 2, 1); // Create neural net and run tests. var actFn = new Logistic(); var net = new NeuralNetAcyclic(digraph, actFn.Fn); TwoInputs_WeightHalf_Inner(net, actFn); // Create vectorized neural net and run tests. var vnet = new NeuralNets.Double.Vectorized.NeuralNetAcyclic(digraph, actFn.Fn); TwoInputs_WeightHalf_Inner(vnet, actFn); }
public void MultipleInputsOutputs() { var connList = new List <WeightedDirectedConnection <double> > { new WeightedDirectedConnection <double>(0, 5, 1.0), new WeightedDirectedConnection <double>(1, 3, 1.0), new WeightedDirectedConnection <double>(2, 4, 1.0) }; // Create graph. var digraph = WeightedDirectedGraphAcyclicBuilder <double> .Create(connList, 3, 3); // Create neural net and run tests. var actFn = new Logistic(); var net = new NeuralNetAcyclic(digraph, actFn.Fn); MultipleInputsOutputs_Inner(net, actFn); // Create vectorized neural net and run tests. var vnet = new NeuralNets.Double.Vectorized.NeuralNetAcyclic(digraph, actFn.Fn); MultipleInputsOutputs_Inner(vnet, actFn); }
public void HiddenNode() { var connList = new LightweightList <WeightedDirectedConnection <double> > { new WeightedDirectedConnection <double>(0, 3, 0.5), new WeightedDirectedConnection <double>(1, 3, 0.5), new WeightedDirectedConnection <double>(3, 2, 2.0) }; var connSpan = connList.AsSpan(); // Create graph. var digraph = WeightedDirectedGraphAcyclicBuilder <double> .Create(connSpan, 2, 1); // Create neural net and run tests. var actFn = new Logistic(); var net = new NeuralNetAcyclic(digraph, actFn.Fn); HiddenNode_Inner(net, actFn); // Create vectorized neural net and run tests. var vnet = new NeuralNets.Double.Vectorized.NeuralNetAcyclic(digraph, actFn.Fn); HiddenNode_Inner(vnet, actFn); }