public void Training(Regression training_data, int batch_size = 128)
        {
            if (batch_size <= 0)
            {
                return;
            }
            if (batch_size > training_data.Length)
            {
                batch_size = training_data.Length;
            }

            circle = 0;
            do
            {
                total_error = 0f;

                var batch_counter = 0;
                var batch_limit   = batch_size;
                while (batch_counter < training_data.Length)
                {
                    var batch_regression = new Regression();
                    for (var i = batch_counter; i < batch_limit && i < training_data.Length; i++)
                    {
                        batch_regression.Add(training_data.inputs[i], training_data.outputs[i]);
                    }

                    var len = batch_regression.Length;
                    for (var i = 0; i < len; i++)
                    {
                        Training(batch_regression.inputs[i], batch_regression.outputs[i]);
                        total_error += GetError();
                    }
                    batch_counter += batch_size;
                    batch_limit   += batch_size;
                    batch_regression.Dispose();
                }

                if (!infinite_loop)
                {
                    if (circle >= max_circle)
                    {
                        break;
                    }
                }
                circle++;
            } while (!ignore_error && (total_error >= error_limit));
        }