Where is the function “gradeint_function” defined in the code for Lab04?
Thanks for the response
But where can I find the definition of “gradient_function” which appears in the args or is it like a built-in function?
Apologies, I mis-read your question.
“gradient_function” is a function pointer. The function name that is called is defined when gradient_descent() is called.
For example, here’s how it looks in the test case:
“compute_gradient()” is used in this code.
Still confused, I am unable to find “gradient_function” defined anywhere before calling it in the code in lab04. Any way I can call to connect you?
gradient_function is a variable that holds a reference to a function.
There’s no “function” definition for “gradient_function” - it’s just a variable that refers to a real defined function.