protected void SetupNetworkTraining()
    {
        NetworkSetuped = false;

        var training = DataTrainingSet.Buffer.Text.Trim();

        if (string.IsNullOrEmpty(training))
        {
            return;
        }

        NetworkSetuped = SetupInputData(training);

        // Reset Network
        Network.Free();

        Options.Alpha      = Convert.ToDouble(LearningRate.Value, ci) * 1.0e-2;
        Options.Epochs     = Convert.ToInt32(Epochs.Value, ci);
        Options.Inputs     = Convert.ToInt32(InputLayerNodes.Value, ci);
        Options.Categories = Convert.ToInt32(Categories.Value, ci);
        Options.Items      = InputData.y;
        Options.Nodes      = Convert.ToInt32(HiddenLayerNodes.Value, ci);
        Options.Tolerance  = Convert.ToDouble(Tolerance.Value, ci) * 1.0e-5;

        if (UseOptimizer.Active)
        {
            Network.SetupOptimizer(InputData, OutputData, Options);
        }
        else
        {
            Network.Setup(OutputData, Options);
        }

        DataTrainingSet.Buffer.Text = training;
    }
    protected void SetupNetworkTraining()
    {
        NetworkSetuped = false;

        var training = DataTrainingSet.Buffer.Text.Trim();

        if (string.IsNullOrEmpty(training))
        {
            return;
        }

        NetworkSetuped = SetupInputData(training);

        // Reset Network
        Network.Free();

        Options.Alpha      = Convert.ToDouble(LearningRate.Value, ci) / 100;
        Options.Epochs     = Convert.ToInt32(Epochs.Value, ci);
        Options.Inputs     = Convert.ToInt32(InputLayerNodes.Value, ci);
        Options.Categories = Convert.ToInt32(Categories.Value, ci);
        Options.Items      = InputData.y;
        Options.Nodes      = Convert.ToInt32(HiddenLayerNodes.Value, ci);
        Options.Tolerance  = Convert.ToDouble(Tolerance.Value, ci) / 100000;

        if (NormalizationData != null && NormalizationData.y > 1)
        {
            Network.Min = new double[NormalizationData.x];
            Network.Max = new double[NormalizationData.x];

            for (var i = 0; i < 2; i++)
            {
                Network.Min[i] = NormalizationData[i, 0];
                Network.Max[i] = NormalizationData[i, 1];
            }
        }

        if (UseOptimizer.Active)
        {
            Network.SetupOptimizer(InputData, OutputData, Options, true);
        }
        else
        {
            Network.Setup(OutputData, Options, true);
        }

        DataTrainingSet.Buffer.Text = training;
    }