当前位置: 首页>>代码示例>>C#>>正文


C# EncogWriteHelper.AddProperties方法代码示例

本文整理汇总了C#中Encog.Persist.EncogWriteHelper.AddProperties方法的典型用法代码示例。如果您正苦于以下问题:C# EncogWriteHelper.AddProperties方法的具体用法?C# EncogWriteHelper.AddProperties怎么用?C# EncogWriteHelper.AddProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Encog.Persist.EncogWriteHelper的用法示例。


在下文中一共展示了EncogWriteHelper.AddProperties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Save

 /// <summary>
 /// 
 /// </summary>
 ///
 public void Save(Stream os, Object obj)
 {
     var xout = new EncogWriteHelper(os);
     var hopfield = (HopfieldNetwork) obj;
     xout.AddSection("HOPFIELD");
     xout.AddSubSection("PARAMS");
     xout.AddProperties(hopfield.Properties);
     xout.AddSubSection("NETWORK");
     xout.WriteProperty(PersistConst.Weights, hopfield.Weights);
     xout.WriteProperty(PersistConst.Output, hopfield.CurrentState.Data);
     xout.WriteProperty(PersistConst.NeuronCount, hopfield.NeuronCount);
     xout.Flush();
 }
开发者ID:encog,项目名称:encog-silverlight-core,代码行数:17,代码来源:PersistHopfield.cs

示例2: Save

        /// <inheritdoc/>
        public void Save(Stream os, Object obj)
        {
            var xout = new EncogWriteHelper(os);
            var net = (RBFNetwork) obj;
            var flat = (FlatNetworkRBF) net.Flat;
            xout.AddSection("RBF-NETWORK");
            xout.AddSubSection("PARAMS");
            xout.AddProperties(net.Properties);
            xout.AddSubSection("NETWORK");
            xout.WriteProperty(BasicNetwork.TagBeginTraining,
                               flat.BeginTraining);
            xout.WriteProperty(BasicNetwork.TagConnectionLimit,
                               flat.ConnectionLimit);
            xout.WriteProperty(BasicNetwork.TagContextTargetOffset,
                               flat.ContextTargetOffset);
            xout.WriteProperty(BasicNetwork.TagContextTargetSize,
                               flat.ContextTargetSize);
            xout.WriteProperty(BasicNetwork.TagEndTraining, flat.EndTraining);
            xout.WriteProperty(BasicNetwork.TagHasContext, flat.HasContext);
            xout.WriteProperty(PersistConst.InputCount, flat.InputCount);
            xout.WriteProperty(BasicNetwork.TagLayerCounts, flat.LayerCounts);
            xout.WriteProperty(BasicNetwork.TagLayerFeedCounts,
                               flat.LayerFeedCounts);
            xout.WriteProperty(BasicNetwork.TagLayerContextCount,
                               flat.LayerContextCount);
            xout.WriteProperty(BasicNetwork.TagLayerIndex, flat.LayerIndex);
            xout.WriteProperty(PersistConst.Output, flat.LayerOutput);
            xout.WriteProperty(PersistConst.OutputCount, flat.OutputCount);
            xout.WriteProperty(BasicNetwork.TagWeightIndex, flat.WeightIndex);
            xout.WriteProperty(PersistConst.Weights, flat.Weights);
            xout.WriteProperty(BasicNetwork.TagBiasActivation,
                               flat.BiasActivation);
            xout.AddSubSection("ACTIVATION");

            foreach (IActivationFunction af  in  flat.ActivationFunctions)
            {
                xout.AddColumn(af.GetType().Name);
                foreach (double t in af.Params)
                {
                    xout.AddColumn(t);
                }
                xout.WriteLine();
            }
            xout.AddSubSection("RBF");

            foreach (IRadialBasisFunction rbf  in  flat.RBF)
            {
                xout.AddColumn(rbf.GetType().Name);
                xout.AddColumn(rbf.Width);
                xout.AddColumn(rbf.Peak);
                foreach (double t in rbf.Centers)
                {
                    xout.AddColumn(t);
                }
                xout.WriteLine();
            }

            xout.Flush();
        }
开发者ID:johannsutherland,项目名称:encog-dotnet-core,代码行数:60,代码来源:PersistRBFNetwork.cs

示例3: Save

        /// <inheritdoc/>
        public void Save(Stream os, Object obj)
        {
            EncogWriteHelper o = new EncogWriteHelper(os);
            BayesianNetwork b = (BayesianNetwork)obj;
            o.AddSection("BAYES-NETWORK");
            o.AddSubSection("BAYES-PARAM");
            String queryType = "";
            String queryStr = b.ClassificationStructure;

            if (b.Query != null)
            {
                queryType = b.Query.GetType().Name;
            }

            o.WriteProperty("queryType", queryType);
            o.WriteProperty("query", queryStr);
            o.WriteProperty("contents", b.Contents);
            o.AddSubSection("BAYES-PROPERTIES");
            o.AddProperties(b.Properties);

            o.AddSubSection("BAYES-TABLE");
            foreach (BayesianEvent e in b.Events)
            {
                foreach (TableLine line in e.Table.Lines)
                {
                    if (line == null)
                        continue;
                    StringBuilder str = new StringBuilder();
                    str.Append("P(");

                    str.Append(BayesianEvent.FormatEventName(e, line.Result));

                    if (e.Parents.Count > 0)
                    {
                        str.Append("|");
                    }

                    int index = 0;
                    bool first = true;
                    foreach (BayesianEvent parentEvent in e.Parents)
                    {
                        if (!first)
                        {
                            str.Append(",");
                        }
                        first = false;
                        int arg = line.Arguments[index++];
                        if (parentEvent.IsBoolean)
                        {
                            if (arg == 0)
                            {
                                str.Append("+");
                            }
                            else
                            {
                                str.Append("-");
                            }
                        }
                        str.Append(parentEvent.Label);
                        if (!parentEvent.IsBoolean)
                        {
                            str.Append("=");
                            if (arg >= parentEvent.Choices.Count)
                            {
                                throw new BayesianError("Argument value " + arg + " is out of range for event " + parentEvent.ToString());
                            }
                            str.Append(parentEvent.GetChoice(arg));
                        }
                    }
                    str.Append(")=");
                    str.Append(line.Probability);
                    str.Append("\n");
                    o.Write(str.ToString());
                }
            }

            o.Flush();
        }
开发者ID:CreativelyMe,项目名称:encog-dotnet-core,代码行数:79,代码来源:PersistBayes.cs

示例4: Save

 public void Save(Stream os, object obj)
 {
     BasicNetwork network;
     FlatNetwork flat;
     IActivationFunction function;
     int num;
     IActivationFunction[] activationFunctions;
     int num2;
     EncogWriteHelper helper = new EncogWriteHelper(os);
     if ((((uint) num2) + ((uint) num)) >= 0)
     {
         goto Label_0290;
     }
     goto Label_0059;
     Label_0024:
     if (num < function.Params.Length)
     {
         helper.AddColumn(function.Params[num]);
         goto Label_0080;
     }
     if (-1 == 0)
     {
         goto Label_00CC;
     }
     helper.WriteLine();
     Label_0040:
     num2++;
     Label_0046:
     if (num2 < activationFunctions.Length)
     {
         goto Label_00F8;
     }
     helper.Flush();
     goto Label_0071;
     Label_0059:
     num++;
     if (((uint) num2) <= uint.MaxValue)
     {
         goto Label_0024;
     }
     Label_0071:
     if (1 != 0)
     {
         return;
     }
     goto Label_0290;
     Label_0080:
     if ((((uint) num2) + ((uint) num)) < 0)
     {
         goto Label_0135;
     }
     goto Label_0059;
     Label_00CC:
     helper.WriteProperty("biasActivation", flat.BiasActivation);
     helper.AddSubSection("ACTIVATION");
     activationFunctions = flat.ActivationFunctions;
     num2 = 0;
     goto Label_0046;
     Label_00F8:
     function = activationFunctions[num2];
     if (((uint) num2) >= 0)
     {
         helper.AddColumn(function.GetType().Name);
     }
     if (0x7fffffff != 0)
     {
         num = 0;
         goto Label_0024;
     }
     goto Label_0080;
     Label_0135:
     helper.WriteProperty("outputCount", flat.OutputCount);
     if ((((uint) num) & 0) != 0)
     {
         goto Label_00F8;
     }
     helper.WriteProperty("weightIndex", flat.WeightIndex);
     helper.WriteProperty("weights", flat.Weights);
     goto Label_00CC;
     Label_0290:
     network = (BasicNetwork) obj;
     flat = network.Structure.Flat;
     helper.AddSection("BASIC");
     helper.AddSubSection("PARAMS");
     helper.AddProperties(network.Properties);
     if (((uint) num2) < 0)
     {
         goto Label_0040;
     }
     helper.AddSubSection("NETWORK");
     helper.WriteProperty("beginTraining", flat.BeginTraining);
     helper.WriteProperty("connectionLimit", flat.ConnectionLimit);
     helper.WriteProperty("contextTargetOffset", flat.ContextTargetOffset);
     helper.WriteProperty("contextTargetSize", flat.ContextTargetSize);
     helper.WriteProperty("endTraining", flat.EndTraining);
     helper.WriteProperty("hasContext", flat.HasContext);
     helper.WriteProperty("inputCount", flat.InputCount);
     helper.WriteProperty("layerCounts", flat.LayerCounts);
     helper.WriteProperty("layerFeedCounts", flat.LayerFeedCounts);
     helper.WriteProperty("layerContextCount", flat.LayerContextCount);
//.........这里部分代码省略.........
开发者ID:neismit,项目名称:emds,代码行数:101,代码来源:PersistBasicNetwork.cs

示例5: Save

        /// <inheritdoc/>
        public void Save(Stream os, Object obj)
        {
            var xout = new EncogWriteHelper(os);
            var cpn = (CPNNetwork) obj;
            xout.AddSection("CPN");
            xout.AddSubSection("PARAMS");
            xout.AddProperties(cpn.Properties);
            xout.AddSubSection("NETWORK");

            xout.WriteProperty(PersistConst.InputCount, cpn.InputCount);
            xout.WriteProperty(PersistConst.Instar, cpn.InstarCount);
            xout.WriteProperty(PersistConst.OutputCount, cpn.OutputCount);
            xout.WriteProperty(PropertyInputToInstar,
                               cpn.WeightsInputToInstar);
            xout.WriteProperty(PropertyInstarToInput,
                               cpn.WeightsInstarToOutstar);
            xout.WriteProperty(PropertyWinnerCount, cpn.WinnerCount);

            xout.Flush();
        }
开发者ID:johannsutherland,项目名称:encog-dotnet-core,代码行数:21,代码来源:PersistCPN.cs

示例6: Save

 public void Save(Stream os, object obj)
 {
     ART1 art;
     EncogWriteHelper helper = new EncogWriteHelper(os);
     goto Label_010B;
     Label_000C:
     helper.Flush();
     if (2 != 0)
     {
         return;
     }
     Label_0019:
     helper.WriteProperty("noWinner", art.NoWinner);
     do
     {
         helper.WriteProperty("L", art.L);
     }
     while (0 != 0);
     helper.WriteProperty("VIGILANCE", art.Vigilance);
     helper.WriteProperty("weightsF1F2", art.WeightsF1ToF2);
     helper.WriteProperty("weightsF2F1", art.WeightsF2ToF1);
     goto Label_000C;
     Label_010B:
     art = (ART1) obj;
     if (0 == 0)
     {
         helper.AddSection("ART1");
         helper.AddSubSection("PARAMS");
         if (0 == 0)
         {
             helper.AddProperties(art.Properties);
             helper.AddSubSection("NETWORK");
             helper.WriteProperty("A1", art.A1);
         }
         helper.WriteProperty("B1", art.B1);
         helper.WriteProperty("C1", art.C1);
         if (0 != 0)
         {
             goto Label_000C;
         }
         helper.WriteProperty("D1", art.D1);
         helper.WriteProperty("f1Count", art.F1Count);
     }
     helper.WriteProperty("f2Count", art.F2Count);
     if (3 != 0)
     {
         if (0 != 0)
         {
             return;
         }
         goto Label_0019;
     }
     goto Label_010B;
 }
开发者ID:neismit,项目名称:emds,代码行数:54,代码来源:PersistART1.cs

示例7: Save

        /// <summary>
        /// 
        /// </summary>
        ///
        public void Save(Stream os, Object obj)
        {
            var xout = new EncogWriteHelper(os);
            var bam = (BAMNetwork) obj;
            xout.AddSection("BAM");
            xout.AddSubSection("PARAMS");
            xout.AddProperties(bam.Properties);
            xout.AddSubSection("NETWORK");

            xout.WriteProperty(PersistConst.PropertyF1Count, bam.F1Count);
            xout.WriteProperty(PersistConst.PropertyF2Count, bam.F2Count);
            xout.WriteProperty(PersistConst.PropertyWeightsF1F2,
                               bam.WeightsF1ToF2);
            xout.WriteProperty(PersistConst.PropertyWeightsF2F1,
                               bam.WeightsF2ToF1);

            xout.Flush();
        }
开发者ID:neismit,项目名称:emds,代码行数:22,代码来源:PersistBAM.cs

示例8: Save

        /// <inheritdoc/>
        public void Save(Stream os, Object obj)
        {
            var xout = new EncogWriteHelper(os);
            var net = (BasicNetwork) obj;
            FlatNetwork flat = net.Structure.Flat;
            xout.AddSection("BASIC");
            xout.AddSubSection("PARAMS");
            xout.AddProperties(net.Properties);
            xout.AddSubSection("NETWORK");

            xout.WriteProperty(BasicNetwork.TagBeginTraining,
                               flat.BeginTraining);
            xout.WriteProperty(BasicNetwork.TagConnectionLimit,
                               flat.ConnectionLimit);
            xout.WriteProperty(BasicNetwork.TagContextTargetOffset,
                               flat.ContextTargetOffset);
            xout.WriteProperty(BasicNetwork.TagContextTargetSize,
                               flat.ContextTargetSize);
            xout.WriteProperty(BasicNetwork.TagEndTraining, flat.EndTraining);
            xout.WriteProperty(BasicNetwork.TagHasContext, flat.HasContext);
            xout.WriteProperty(PersistConst.InputCount, flat.InputCount);
            xout.WriteProperty(BasicNetwork.TagLayerCounts, flat.LayerCounts);
            xout.WriteProperty(BasicNetwork.TagLayerFeedCounts,
                               flat.LayerFeedCounts);
            xout.WriteProperty(BasicNetwork.TagLayerContextCount,
                               flat.LayerContextCount);
            xout.WriteProperty(BasicNetwork.TagLayerIndex, flat.LayerIndex);
            xout.WriteProperty(PersistConst.Output, flat.LayerOutput);
            xout.WriteProperty(PersistConst.OutputCount, flat.OutputCount);
            xout.WriteProperty(BasicNetwork.TagWeightIndex, flat.WeightIndex);
            xout.WriteProperty(PersistConst.Weights, flat.Weights);
            xout.WriteProperty(BasicNetwork.TagBiasActivation,
                               flat.BiasActivation);
            xout.AddSubSection("ACTIVATION");

            foreach (IActivationFunction af  in  flat.ActivationFunctions)
            {
                xout.AddColumn(af.GetType().Name);
                for (int i = 0; i < af.Params.Length; i++)
                {
                    xout.AddColumn(af.Params[i]);
                }
                xout.WriteLine();
            }

            xout.Flush();
        }
开发者ID:JDFagan,项目名称:encog-dotnet-core,代码行数:48,代码来源:PersistBasicNetwork.cs

示例9: Save

        /// <inheritdoc />
        public void Save(Stream ostream, Object obj)
        {
            var writer = new EncogWriteHelper(ostream);
            var pop = (PrgPopulation) obj;

            writer.AddSection("BASIC");
            writer.AddSubSection("PARAMS");
            writer.AddProperties(pop.Properties);
            writer.AddSubSection("EPL-OPCODES");
            foreach (IProgramExtensionTemplate temp in pop.Context
                                                          .Functions.OpCodes)
            {
                writer.AddColumn(temp.Name);
                writer.AddColumn(temp.ChildNodeCount);
                writer.WriteLine();
            }
            writer.AddSubSection("EPL-SYMBOLIC");
            writer.AddColumn("name");
            writer.AddColumn("type");
            writer.AddColumn("enum");
            writer.AddColumn("enum_type");
            writer.AddColumn("enum_count");
            writer.WriteLine();

            // write the first line, the result
            writer.AddColumn("");
            writer.AddColumn(GetType(pop.Context.Result));
            writer.AddColumn(pop.Context.Result.EnumType);
            writer.AddColumn(pop.Context.Result.EnumValueCount);
            writer.WriteLine();

            // write the next lines, the variables
            foreach (VariableMapping mapping in pop.Context.DefinedVariables)
            {
                writer.AddColumn(mapping.Name);
                writer.AddColumn(GetType(mapping));
                writer.AddColumn(mapping.EnumType);
                writer.AddColumn(mapping.EnumValueCount);
                writer.WriteLine();
            }
            writer.AddSubSection("EPL-POPULATION");
            foreach (ISpecies species in pop.Species)
            {
                if (species.Members.Count > 0)
                {
                    writer.AddColumn("s");
                    writer.AddColumn(species.Age);
                    writer.AddColumn(species.BestScore);
                    writer.AddColumn(species.GensNoImprovement);
                    writer.WriteLine();
                    foreach (IGenome genome in species.Members)
                    {
                        var prg = (EncogProgram) genome;
                        writer.AddColumn("p");
                        if (Double.IsInfinity(prg.Score)
                            || Double.IsNaN(prg.Score))
                        {
                            writer.AddColumn("NaN");
                            writer.AddColumn("NaN");
                        }
                        else
                        {
                            writer.AddColumn(prg.Score);
                            writer.AddColumn(prg.AdjustedScore);
                        }

                        writer.AddColumn(prg.GenerateEPL());
                        writer.WriteLine();
                    }
                }
            }

            writer.Flush();
        }
开发者ID:benw408701,项目名称:MLHCTransactionPredictor,代码行数:75,代码来源:PersistPrgPopulation.cs

示例10: Save

 public void Save(Stream os, object obj)
 {
     SupportVectorMachine machine;
     EncogWriteHelper helper = new EncogWriteHelper(os);
     if (8 != 0)
     {
     }
     Label_026A:
     machine = (SupportVectorMachine) obj;
     helper.AddSection("SVM");
     if (0 == 0)
     {
         while (true)
         {
             helper.AddSubSection("PARAMS");
             helper.AddProperties(machine.Properties);
             helper.AddSubSection("SVM-PARAM");
             helper.WriteProperty("inputCount", machine.InputCount);
             helper.WriteProperty("C", machine.Params.C);
             if (0 == 0)
             {
                 helper.WriteProperty("cacheSize", machine.Params.cache_size);
                 if (-2 == 0)
                 {
                     goto Label_026A;
                 }
                 helper.WriteProperty("coef0", machine.Params.coef0);
                 helper.WriteProperty("degree", machine.Params.degree);
                 helper.WriteProperty("eps", machine.Params.eps);
                 helper.WriteProperty("gamma", machine.Params.gamma);
                 helper.WriteProperty("kernelType", machine.Params.kernel_type);
             }
             helper.WriteProperty("nrWeight", machine.Params.nr_weight);
             if (1 != 0)
             {
                 helper.WriteProperty("nu", machine.Params.nu);
                 helper.WriteProperty("p", machine.Params.p);
                 helper.WriteProperty("probability", machine.Params.probability);
                 helper.WriteProperty("shrinking", machine.Params.shrinking);
                 helper.WriteProperty("svmType", machine.Params.svm_type);
                 helper.WriteProperty("weight", machine.Params.weight);
                 helper.WriteProperty("weightLabel", machine.Params.weight_label);
                 break;
             }
         }
     }
     Label_0092:
     while (machine.Model != null)
     {
         helper.AddSubSection("SVM-MODEL");
         try
         {
             StreamWriter writer;
             ASCIIEncoding encoding;
             MemoryStream stream = new MemoryStream();
             if (1 != 0)
             {
                 goto Label_005F;
             }
         Label_003E:
             helper.Write(encoding.GetString(stream.ToArray()));
             writer.Close();
             stream.Close();
             break;
         Label_005F:
             writer = new StreamWriter(stream);
             if (0 == 0)
             {
                 svm.svm_save_model(writer, machine.Model);
             }
             encoding = new ASCIIEncoding();
             goto Label_003E;
         }
         catch (IOException exception)
         {
             throw new PersistError(exception);
         }
     }
     while (true)
     {
         helper.Flush();
         if (-2147483648 != 0)
         {
             return;
         }
         if (0 != 0)
         {
             goto Label_0092;
         }
     }
 }
开发者ID:neismit,项目名称:emds,代码行数:91,代码来源:PersistSVM.cs

示例11: Save

        /// <inheritdoc/>
        public void Save(Stream os, Object obj)
        {
            EncogWriteHelper writer = new EncogWriteHelper(os);
            HiddenMarkovModel net = (HiddenMarkovModel)obj;

            writer.AddSection("HMM");
            writer.AddSubSection("PARAMS");
            writer.AddProperties(net.Properties);
            writer.AddSubSection("CONFIG");

            writer.WriteProperty(HiddenMarkovModel.TAG_STATES, net.StateCount);
            if (net.Items != null)
            {
                writer.WriteProperty(HiddenMarkovModel.TAG_ITEMS, net.Items);
            }
            writer.WriteProperty(HiddenMarkovModel.TAG_PI, net.Pi);
            writer.WriteProperty(HiddenMarkovModel.TAG_TRANSITION, new Matrix(net.TransitionProbability));

            for (int i = 0; i < net.StateCount; i++)
            {
                writer.AddSubSection("DISTRIBUTION-" + i);
                IStateDistribution sd = net.StateDistributions[i];
                writer.WriteProperty(HiddenMarkovModel.TAG_DIST_TYPE, sd.GetType().Name);

                if (sd is ContinousDistribution)
                {
                    ContinousDistribution cDist = (ContinousDistribution)sd;
                    writer.WriteProperty(HiddenMarkovModel.TAG_MEAN, cDist.Mean);
                    writer.WriteProperty(HiddenMarkovModel.TAG_COVARIANCE, cDist.Covariance);

                }
                else if (sd is DiscreteDistribution)
                {
                    DiscreteDistribution dDist = (DiscreteDistribution)sd;
                    writer.WriteProperty(HiddenMarkovModel.TAG_PROBABILITIES, new Matrix(dDist.Probabilities));
                }
            }

            writer.Flush();
        }
开发者ID:Romiko,项目名称:encog-dotnet-core,代码行数:41,代码来源:PersistHMM.cs

示例12: Save

 public void Save(Stream os, object obj)
 {
     EncogWriteHelper helper = new EncogWriteHelper(os);
     while (true)
     {
         SOMNetwork network = (SOMNetwork) obj;
         helper.AddSection("SOM");
         helper.AddSubSection("PARAMS");
         helper.AddProperties(network.Properties);
         helper.AddSubSection("NETWORK");
         helper.WriteProperty("weights", network.Weights);
         helper.WriteProperty("inputCount", network.InputCount);
         if (0 == 0)
         {
             helper.WriteProperty("outputCount", network.OutputCount);
             helper.Flush();
         }
         if ((0 != 0) || (0 == 0))
         {
             return;
         }
     }
 }
开发者ID:neismit,项目名称:emds,代码行数:23,代码来源:PersistSOM.cs

示例13: Save


//.........这里部分代码省略.........
     }
     helper.AddSubSection("RBF");
     if ((((uint) num5) | 15) != 0)
     {
         goto Label_01B0;
     }
     goto Label_011D;
     Label_0117:
     num4++;
     Label_011D:
     if (num4 < @params.Length)
     {
         num = @params[num4];
         helper.AddColumn(num);
         goto Label_0117;
     }
     Label_0125:
     helper.WriteLine();
     num3++;
     goto Label_00FA;
     Label_0161:
     helper.AddColumn(function.GetType().Name);
     @params = function.Params;
     Label_017A:
     num4 = 0;
     if ((((uint) num5) + ((uint) index)) > uint.MaxValue)
     {
         goto Label_03BC;
     }
     if ((((uint) num4) + ((uint) num)) <= uint.MaxValue)
     {
         goto Label_011D;
     }
     Label_01B0:
     if (((uint) num3) >= 0)
     {
         goto Label_00C6;
     }
     Label_01C2:
     if (0xff == 0)
     {
         goto Label_017A;
     }
     num3 = 0;
     if ((((uint) index) | 1) != 0)
     {
         goto Label_00FA;
     }
     goto Label_00C6;
     Label_020D:
     helper.WriteProperty("biasActivation", flat.BiasActivation);
     helper.AddSubSection("ACTIVATION");
     activationFunctions = flat.ActivationFunctions;
     goto Label_01C2;
     Label_02A1:
     helper.WriteProperty("layerContextCount", flat.LayerContextCount);
     helper.WriteProperty("layerIndex", flat.LayerIndex);
     if ((((uint) index) + ((uint) num)) < 0)
     {
         goto Label_0117;
     }
     helper.WriteProperty("output", flat.LayerOutput);
     helper.WriteProperty("outputCount", flat.OutputCount);
     helper.WriteProperty("weightIndex", flat.WeightIndex);
     if ((((uint) num) - ((uint) num5)) < 0)
     {
         goto Label_03F8;
     }
     helper.WriteProperty("weights", flat.Weights);
     goto Label_020D;
     Label_02E5:
     helper.WriteProperty("inputCount", flat.InputCount);
     helper.WriteProperty("layerCounts", flat.LayerCounts);
     if ((((uint) num4) - ((uint) index)) < 0)
     {
         goto Label_0161;
     }
     helper.WriteProperty("layerFeedCounts", flat.LayerFeedCounts);
     if (0x7fffffff != 0)
     {
         goto Label_02A1;
     }
     Label_0378:
     helper.WriteProperty("beginTraining", flat.BeginTraining);
     helper.WriteProperty("connectionLimit", flat.ConnectionLimit);
     helper.WriteProperty("contextTargetOffset", flat.ContextTargetOffset);
     helper.WriteProperty("contextTargetSize", flat.ContextTargetSize);
     Label_03BC:
     helper.WriteProperty("endTraining", flat.EndTraining);
     helper.WriteProperty("hasContext", flat.HasContext);
     if ((((uint) num5) | 3) == 0)
     {
         goto Label_006E;
     }
     goto Label_02E5;
     Label_03F8:
     helper.AddProperties(network.Properties);
     helper.AddSubSection("NETWORK");
     goto Label_0378;
 }
开发者ID:neismit,项目名称:emds,代码行数:101,代码来源:PersistRBFNetwork.cs

示例14: Save

        /// <inheritdoc/>
        public void Save(Stream os, Object obj)
        {
            var xout = new EncogWriteHelper(os);
            var boltz = (BoltzmannMachine) obj;
            xout.AddSection("BOLTZMANN");
            xout.AddSubSection("PARAMS");
            xout.AddProperties(boltz.Properties);
            xout.AddSubSection("NETWORK");
            xout.WriteProperty(PersistConst.Weights, boltz.Weights);
            xout.WriteProperty(PersistConst.Output, boltz.CurrentState.Data);
            xout.WriteProperty(PersistConst.NeuronCount, boltz.NeuronCount);

            xout.WriteProperty(PersistConst.Thresholds, boltz.Threshold);
            xout.WriteProperty(BoltzmannMachine.ParamAnnealCycles,
                               boltz.AnnealCycles);
            xout.WriteProperty(BoltzmannMachine.ParamRunCycles, boltz.RunCycles);
            xout.WriteProperty(PersistConst.Temperature, boltz.Temperature);

            xout.Flush();
        }
开发者ID:Romiko,项目名称:encog-dotnet-core,代码行数:21,代码来源:PersistBoltzmann.cs

示例15: Save

 public void Save(Stream os, object obj)
 {
     HopfieldNetwork network;
     EncogWriteHelper helper = new EncogWriteHelper(os);
     goto Label_00A2;
     Label_0028:
     helper.WriteProperty("neurons", network.NeuronCount);
     helper.Flush();
     if (4 != 0)
     {
         return;
     }
     if (4 != 0)
     {
         goto Label_00A2;
     }
     goto Label_0064;
     Label_004C:
     helper.WriteProperty("output", network.CurrentState.Data);
     goto Label_0028;
     Label_0064:
     helper.AddSection("HOPFIELD");
     helper.AddSubSection("PARAMS");
     if (2 == 0)
     {
         goto Label_004C;
     }
     helper.AddProperties(network.Properties);
     helper.AddSubSection("NETWORK");
     if (0 == 0)
     {
         helper.WriteProperty("weights", network.Weights);
         goto Label_004C;
     }
     goto Label_0028;
     Label_00A2:
     network = (HopfieldNetwork) obj;
     goto Label_0064;
 }
开发者ID:neismit,项目名称:emds,代码行数:39,代码来源:PersistHopfield.cs


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