本文整理汇总了C#中Encog.Neural.Networks.Training.Propagation.Resilient.ResilientPropagation.Pause方法的典型用法代码示例。如果您正苦于以下问题:C# ResilientPropagation.Pause方法的具体用法?C# ResilientPropagation.Pause怎么用?C# ResilientPropagation.Pause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Encog.Neural.Networks.Training.Propagation.Resilient.ResilientPropagation
的用法示例。
在下文中一共展示了ResilientPropagation.Pause方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestRPROPCont
public void TestRPROPCont()
{
IMLDataSet trainingSet = XOR.CreateXORDataSet();
BasicNetwork net1 = XOR.CreateUnTrainedXOR();
BasicNetwork net2 = XOR.CreateUnTrainedXOR();
ResilientPropagation rprop1 = new ResilientPropagation(net1, trainingSet);
ResilientPropagation rprop2 = new ResilientPropagation(net2, trainingSet);
rprop1.Iteration();
rprop1.Iteration();
rprop2.Iteration();
rprop2.Iteration();
TrainingContinuation cont = rprop2.Pause();
ResilientPropagation rprop3 = new ResilientPropagation(net2, trainingSet);
rprop3.Resume(cont);
rprop1.Iteration();
rprop3.Iteration();
for (int i = 0; i < net1.Flat.Weights.Length; i++)
{
Assert.AreEqual(net1.Flat.Weights[i], net2.Flat.Weights[i], 0.0001);
}
}
示例2: TestRPROPContPersistEG
public void TestRPROPContPersistEG()
{
IMLDataSet trainingSet = XOR.CreateXORDataSet();
BasicNetwork net1 = XOR.CreateUnTrainedXOR();
BasicNetwork net2 = XOR.CreateUnTrainedXOR();
ResilientPropagation rprop1 = new ResilientPropagation(net1, trainingSet);
ResilientPropagation rprop2 = new ResilientPropagation(net2, trainingSet);
rprop1.Iteration();
rprop1.Iteration();
rprop2.Iteration();
rprop2.Iteration();
TrainingContinuation cont = rprop2.Pause();
EncogDirectoryPersistence.SaveObject(EG_FILENAME, cont);
TrainingContinuation cont2 = (TrainingContinuation)EncogDirectoryPersistence.LoadObject(EG_FILENAME);
ResilientPropagation rprop3 = new ResilientPropagation(net2, trainingSet);
rprop3.Resume(cont2);
rprop1.Iteration();
rprop3.Iteration();
for (int i = 0; i < net1.Flat.Weights.Length; i++)
{
Assert.AreEqual(net1.Flat.Weights[i], net2.Flat.Weights[i], 0.0001);
}
}