本文整理汇总了C#中Network.Connect方法的典型用法代码示例。如果您正苦于以下问题:C# Network.Connect方法的具体用法?C# Network.Connect怎么用?C# Network.Connect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network.Connect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Both_inputs_low
public void Both_inputs_low()
{
var neuronA = new InputNeuron(0, 1);
var neuronB = new InputNeuron(0, 1);
var neuronC = new OutputNeuron(1.5, 1, 0);
var network = new Network();
network.Connect(neuronA, neuronC);
network.Connect(neuronB, neuronC);
Assert.IsFalse(network.Execute());
}
示例2: Both_inputs_high
public void Both_inputs_high()
{
var neuronA = new InputNeuron(1, 1);
var neuronB = new InputNeuron(1, 1);
var neuronC = new OutputNeuron(.9, 1, 0);
var network = new Network();
network.Connect(neuronA, neuronC);
network.Connect(neuronB, neuronC);
Assert.IsTrue(network.Execute());
}
示例3: ClickButton_Click
private void ClickButton_Click(object sender, RoutedEventArgs e)
{
network = new Network();
network.AddComponent<AdderComponent>("Sum1");
network.AddComponent<AutoInputComponent>("EvenNumberGenerator");
network.AddComponent<AutoInputComponent>("OddNumberGenerator");
network.AddComponent<OutputterComponent>("NetworkOutput");
network.Connect("EvenNumberGenerator", "OUT", "Sum1", "Term1IN");
network.Connect("OddNumberGenerator", "OUT", "Sum1", "Term2IN");
network.Connect("Sum1", "OUT", "NetworkOutput", "IN");
network.Start();
}
示例4: Both_inputs_low
public void Both_inputs_low()
{
var neuronA = new InputNeuron(0, 1);
var neuronB = new InputNeuron(0, 1);
var hiddenLayerA = new Neuron(1.5, -1);
var hiddenLayerB = new Neuron(.5, 1);
var result = new OutputNeuron(.5, 1, 0);
var network = new Network();
network.Connect(neuronA, hiddenLayerA);
network.Connect(neuronA, hiddenLayerB);
network.Connect(neuronB, hiddenLayerA);
network.Connect(neuronB, hiddenLayerB);
network.Connect(hiddenLayerA, result);
network.Connect(hiddenLayerB, result);
Assert.IsFalse(network.Execute());
}