You are here: Home » NewsFeeds » Simple example of machine learning in TensorFlow

Simple example of machine learning in TensorFlow

README.md

This is a bare bottom example of TensorFlow, a machine learning package published by Google. You will not find a simpler introduction to it.

In each example, a straight line is fit to some data. Values for the slope and y-intercept of the line that best fit the data are determined using gradient descent. If you do not know about gradient descent, check out the Wikipedia page (link).

After creating the required variables, the error between the data and the line is defined. The definition of the error is plugged into the optimizer. TensorFlow is then started and the optimizer is repeatedly called. This iteratively fits the line to the data by minimizing the error.

Read the scripts in this order:

serial.py
tensor.py
bigdata.py
Serial.py

The purpose of this script is to illustrate the nuts and bolts of a TensorFlow model. The script makes it easy to understand how the model is put together.


 

Original article