Et::ConstantExpr C1{ 4 }, C2{ 2 };
Et::VariableExpr X1{ 5.53 }, X2{ -3.12 };
Et::PlaceholderExpr P;
auto Y = X1 * X1 + X2 * X2 + C1 * X1 + C2 * X2 + P;
Et::GradientDescentOptimizer Optimizer{ Y };
int Iterations = 1000;
for (int i = 0; i < Iterations; i++)
{
std::cout << "Value at #" << i + 1 << " : " <<
Optimizer
.ForwardPass(Et::H(P, -6.3))
.Minimize(0.01)
.GetPreResult()
<< std::endl;
}
std::cout << "Final Value : " << Optimizer.GetPostResult() << std::endl;