• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Propagation.TrainingContinuation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Encog.Neural.Networks.Training.Propagation.TrainingContinuation的典型用法代码示例。如果您正苦于以下问题:C# TrainingContinuation类的具体用法?C# TrainingContinuation怎么用?C# TrainingContinuation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TrainingContinuation类属于Encog.Neural.Networks.Training.Propagation命名空间,在下文中一共展示了TrainingContinuation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Read

        /// <inheritdoc/>
        public Object Read(Stream mask0)
        {
            var result = new TrainingContinuation();
            var ins0 = new EncogReadHelper(mask0);
            EncogFileSection section;

            while ((section = ins0.ReadNextSection()) != null)
            {
                if (section.SectionName.Equals("CONT")
                    && section.SubSectionName.Equals("PARAMS"))
                {
                    IDictionary<String, String> paras = section.ParseParams();

                    foreach (String key  in  paras.Keys)
                    {
                        if (key.Equals("type", StringComparison.InvariantCultureIgnoreCase))
                        {
                            result.TrainingType = paras[key];
                        }
                        else
                        {
                            double[] list = EncogFileSection
                                .ParseDoubleArray(paras, key);
                            result.Put(key, list);
                        }
                    }
                }
            }

            return result;
        }
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:32,代码来源:PersistTrainingContinuation.cs


示例2: Pause

 public override sealed TrainingContinuation Pause()
 {
     TrainingContinuation continuation = new TrainingContinuation {
         TrainingType = base.GetType().Name
     };
     continuation.Set("LAST_GRADIENTS", ((TrainFlatNetworkResilient) base.FlatTraining).LastGradient);
     continuation.Set("UPDATE_VALUES", ((TrainFlatNetworkResilient) base.FlatTraining).UpdateValues);
     return continuation;
 }
开发者ID:neismit,项目名称:emds,代码行数:9,代码来源:ResilientPropagation.cs


示例3: IsValidResume

 public bool IsValidResume(TrainingContinuation state)
 {
     if (!state.Contents.ContainsKey("LAST_DELTA"))
     {
         return false;
     }
     if (!state.TrainingType.Equals(base.GetType().Name))
     {
         return false;
     }
     double[] numArray = (double[]) state.Get("LAST_DELTA");
     return (numArray.Length == ((IContainsFlat) this.Method).Flat.Weights.Length);
 }
开发者ID:neismit,项目名称:emds,代码行数:13,代码来源:Backpropagation.cs


示例4: Resume

 public override sealed void Resume(TrainingContinuation state)
 {
     if (!this.IsValidResume(state))
     {
         throw new TrainingError("Invalid training resume data length");
     }
     double[] src = (double[]) state.Get("LAST_GRADIENTS");
     double[] numArray2 = (double[]) state.Get("UPDATE_VALUES");
     EngineArray.ArrayCopy(src, ((TrainFlatNetworkResilient) base.FlatTraining).LastGradient);
     if (8 != 0)
     {
     }
     EngineArray.ArrayCopy(numArray2, ((TrainFlatNetworkResilient) base.FlatTraining).UpdateValues);
 }
开发者ID:neismit,项目名称:emds,代码行数:14,代码来源:ResilientPropagation.cs


示例5: IsValidResume

 public bool IsValidResume(TrainingContinuation state)
 {
     if (state.Contents.ContainsKey("LAST_GRADIENTS"))
     {
         if (0 == 0)
         {
             if (0x7fffffff != 0)
             {
             }
             if (!state.Contents.ContainsKey("UPDATE_VALUES"))
             {
                 goto Label_004B;
             }
         }
         if (state.TrainingType.Equals(base.GetType().Name))
         {
             double[] numArray = (double[]) state.Get("LAST_GRADIENTS");
             return (numArray.Length == ((IContainsFlat) this.Method).Flat.Weights.Length);
         }
         return false;
     }
     Label_004B:
     return false;
 }
开发者ID:neismit,项目名称:emds,代码行数:24,代码来源:ResilientPropagation.cs


示例6: Save

        /// <summary>
        /// Save the object.
        /// </summary>
        /// <param name="obj">The object to save.</param>
        /// <param name="xmlout">The XML output object.</param>
        public void Save(IEncogPersistedObject obj, WriteXML xmlout)
        {

            PersistorUtil.BeginEncogObject(
                    EncogPersistedCollection.TYPE_TRAINING_CONTINUATION, xmlout, obj,
                    true);
            this.current = (TrainingContinuation)obj;

            xmlout.BeginTag(TrainingContinuationPersistor.TAG_ITEMS);
            SaveItems(xmlout);
            xmlout.EndTag();

            xmlout.EndTag();
        }
开发者ID:OperatorOverload,项目名称:encog-cs,代码行数:19,代码来源:TrainingContinuationPersistor.cs


示例7: Load

        /// <summary>
        /// Load the object.
        /// </summary>
        /// <param name="xmlin">The XML object to load from.</param>
        /// <returns>The loaded object.</returns>
        public IEncogPersistedObject Load(ReadXML xmlin)
        {
            this.current = new TrainingContinuation();

            String name = xmlin.LastTag.Attributes[
                    EncogPersistedCollection.ATTRIBUTE_NAME];
            String description = xmlin.LastTag.Attributes[
                    EncogPersistedCollection.ATTRIBUTE_DESCRIPTION];

            this.current.Name = name;
            this.current.Description = description;

            while (xmlin.ReadToTag())
            {
                if (xmlin.IsIt(TrainingContinuationPersistor.TAG_ITEMS, true))
                {
                    HandleItems(xmlin);
                }
                else if (xmlin.IsIt(
                    EncogPersistedCollection.TYPE_TRAINING_CONTINUATION, false))
                {
                    break;
                }
            }

            return this.current;
        }
开发者ID:OperatorOverload,项目名称:encog-cs,代码行数:32,代码来源:TrainingContinuationPersistor.cs


示例8: Resume

 /// <inheritdoc/>
 public override void Resume(TrainingContinuation state)
 {
 }
开发者ID:Romiko,项目名称:encog-dotnet-core,代码行数:4,代码来源:TrainAdaline.cs


示例9: Resume

 /// <summary>
 /// from Encog.ml.train.MLTrain
 /// </summary>
 ///
 public abstract void Resume(
     TrainingContinuation state);
开发者ID:benw408701,项目名称:MLHCTransactionPredictor,代码行数:6,代码来源:BasicTraining.cs


示例10: Resume

 /// <inheritdoc/>
 public void Resume(TrainingContinuation state)
 {
 }
开发者ID:neismit,项目名称:emds,代码行数:4,代码来源:NEATTraining.cs


示例11: Resume

 public override void Resume(TrainingContinuation state)
 {
     if (!this.IsValidResume(state))
     {
         throw new TrainingError("Invalid training resume data length");
     }
     double[] src = (double[]) state.Contents["LAST_GRADIENTS"];
     EngineArray.ArrayCopy(src, ((TrainFlatNetworkQPROP) base.FlatTraining).LastGradient);
 }
开发者ID:neismit,项目名称:emds,代码行数:9,代码来源:QuickPropagation.cs


示例12: Pause

 public override TrainingContinuation Pause()
 {
     TrainingContinuation continuation;
     TrainingContinuation continuation2 = new TrainingContinuation();
     do
     {
         continuation2.TrainingType = base.GetType().Name;
         continuation = continuation2;
         TrainFlatNetworkQPROP flatTraining = (TrainFlatNetworkQPROP) base.FlatTraining;
         double[] lastGradient = flatTraining.LastGradient;
         continuation.Contents["LAST_GRADIENTS"] = lastGradient;
     }
     while (0x7fffffff == 0);
     return continuation;
 }
开发者ID:neismit,项目名称:emds,代码行数:15,代码来源:QuickPropagation.cs


示例13: Read

 public object Read(Stream mask0)
 {
     EncogReadHelper helper;
     EncogFileSection section;
     IDictionary<string, string> dictionary;
     TrainingContinuation continuation = new TrainingContinuation();
     if (3 != 0)
     {
         helper = new EncogReadHelper(mask0);
         goto Label_001E;
     }
     Label_0010:
     if ((-2 == 0) || (4 == 0))
     {
         goto Label_005C;
     }
     Label_001E:
     if ((section = helper.ReadNextSection()) == null)
     {
         return continuation;
     }
     if (!section.SectionName.Equals("CONT"))
     {
         if (1 != 0)
         {
             if (0xff == 0)
             {
                 return continuation;
             }
             goto Label_0010;
         }
         if (0 == 0)
         {
             goto Label_0077;
         }
         goto Label_001E;
     }
     Label_005C:
     if (section.SubSectionName.Equals("PARAMS"))
     {
         dictionary = section.ParseParams();
     }
     else if ((0 == 0) && ((0 != 0) || (3 != 0)))
     {
         goto Label_001E;
     }
     Label_0077:
     using (IEnumerator<string> enumerator = dictionary.Keys.GetEnumerator())
     {
         string current;
         double[] numArray;
         goto Label_0090;
     Label_0086:
         continuation.Put(current, numArray);
     Label_0090:
         if (enumerator.MoveNext())
         {
             current = enumerator.Current;
             if (current.Equals("type", StringComparison.InvariantCultureIgnoreCase))
             {
                 continuation.TrainingType = dictionary[current];
                 goto Label_0090;
             }
             numArray = EncogFileSection.ParseDoubleArray(dictionary, current);
             if (0xff != 0)
             {
             }
             goto Label_0086;
         }
     }
     goto Label_001E;
 }
开发者ID:neismit,项目名称:emds,代码行数:72,代码来源:PersistTrainingContinuation.cs


示例14: Pause

 public override sealed TrainingContinuation Pause()
 {
     TrainingContinuation continuation;
     TrainingContinuation continuation2 = new TrainingContinuation {
         TrainingType = base.GetType().Name
     };
     if (0 == 0)
     {
         continuation = continuation2;
         TrainFlatNetworkBackPropagation flatTraining = (TrainFlatNetworkBackPropagation) base.FlatTraining;
         double[] lastDelta = flatTraining.LastDelta;
         continuation.Set("LAST_DELTA", lastDelta);
     }
     return continuation;
 }
开发者ID:neismit,项目名称:emds,代码行数:15,代码来源:Backpropagation.cs


示例15: Resume

 public override sealed void Resume(TrainingContinuation state)
 {
     if (!this.IsValidResume(state))
     {
         throw new TrainingError("Invalid training resume data length");
     }
     ((TrainFlatNetworkBackPropagation) base.FlatTraining).LastDelta = (double[]) state.Get("LAST_DELTA");
 }
开发者ID:neismit,项目名称:emds,代码行数:8,代码来源:Backpropagation.cs



注:本文中的Encog.Neural.Networks.Training.Propagation.TrainingContinuation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Resilient.ResilientPropagation类代码示例发布时间:2022-05-24
下一篇:
C# Networks.BasicNetwork类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap