# October 12, 2019 TensorFlow 2.0: Introduction

One of the most used Python APIs is TensorFlow. TensorFlow was developed by Google to support machine learning. Machine learning takes data, trains it, and creates a linear model based on the data. Machine learning used linear regression to build models for things such as the iRobot vacuum cleaner and econometric models. The other Python API used for machine learning is scikit-learn. Scikit-learn was discussed when we introduced simple linear regression in our data science series.

The focus for this post is TensorFlow 2.0. First, we introduce the API and how it is used. We then look at Keras and how it works in tandem with TensorFlow 2.0.

So, what is TensorFlow 2.0 and why is it an important Python API to learn as data scientists? TensorFlow 2.0 is an end-to-end platform for nice machine learning. TensorFlow can perform regression and classification. As mentioned earlier in the post, it can be used with Keras, scikit-learn, or other APIs. It makes building models more simplistic and efficient. The best way to install TensorFlow 2.0 is to download the Anaconda Python distribution. Anaconda bundles all of Python’s data analytics library in one bundle. Once you have downloaded Anaconda, you will need to make it your default Python installation. Then, in the Anaconda prompt, you need to type the following:

```
pip install tensorflow or conda install tensorflow
```

Both commands will install TensorFlow 2.0, however, you can install the API on a 64-bit machine only. Finally, the library supports experimentation. Companies such as Airbus use the library for image and pattern recognition, classification, etc. Next, we take a look at Keras and how it works with TensorFlow 2.0.

Keras is used for deep learning and models can be built on top of TensorFlow 2.0. Deep learning is the subset of machine learning dealing with neural networks. Artificial neural networks further train data by creating networks similar to the functioning of the human nervous system. A computer with a powerful processor can train huge data sets in a few minutes to a few days. By combining the features of Keras, TensorFlow 2.0 can build complex models.

TensorFlow 2.0 can perform both regression and classification. We take data sets, build models, and make predictions based on our data. Analyzing, building, and predicting a model requires the following steps:

- Import a dataset
- Explore the data within the dataset
- Preprocess the data
- Build the model
- Train the model based on imported data
- Ensure your model is accurate
- Make predictions based on our data

This is a basic introduction to TensorFlow 2.0. In the next post, we will look at several example programs for modeling data with TensorFlow 2.0

**Johnny Hopkins**

Guest Blogger