本文整理汇总了C#中BasicNetwork.SetProperty方法的典型用法代码示例。如果您正苦于以下问题:C# BasicNetwork.SetProperty方法的具体用法?C# BasicNetwork.SetProperty怎么用?C# BasicNetwork.SetProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BasicNetwork
的用法示例。
在下文中一共展示了BasicNetwork.SetProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Generate
/// <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;
}
示例2: Generate
/// <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;
}