C2W3 Tensorflow videos, Question about the discussed cost function?

Question 1.

In the video at timestamp 3:01. It is mentioned that the cost function is
w**2 -10*w +25
This is not discussed in previous videos, how come it turns out like this. Can you please give any reference and help me understand it.

Question 2.

I don’t understand what are we trying to do in the same video. What is w, is it weight which we are trying to tune. if it’s the case then where is input in the first example.

video: https://www.coursera.org/learn/deep-neural-network/lecture/zcZlH/tensorflow

Hi, @Darkstar.

The cost function is defined at 0:52. It’s just an arbitrary function with no special meaning.

What you are doing is solving a simplified optimization problem similar to the one you solve when you train a neural network: You’re given a function J that depends on w and find the value of w that minimizes J. What you call input corresponds to the coefficients (this is made explicit in the example at 7:50).

Hope you’re enjoying the course :slight_smile: