Tensorflow hello world code piece

I am just trying the hello world code piece. I find that if the input number is bigger, the relationship between x and y are not quite linear. Anyone knows why?

tensorflow hello world

If the input is 10, its output is around 19. But if the input is 10000000, the output doesn’t show result that is near what you get from y=2x-1. Does that mean the x and y relationship guessed by the neural network is actually not y=2x-1, but something else. I mean how do we know what kind of formulas the network get?

A trained system is only going to give reasonable results within the range of its training set.

If you didn’t have any training data around 100000000, the model isn’t going to be reliable at predicting it.

Note that NN’s are quite non-linear (due to the hidden layer), even if they’re solving a linear system.

1 Like

The formula the NN uses is a function of the forward propagation using the hidden layer weights and output layer weights.

Thank you for the explanation.