## What is Tensorflow?

Tensorflow is a Machine Learning library built on top of C++, Python, and CUDA by Google Brain Team. We use Tensorflow to create Machine Learning models; it is suitable for newbies and experienced persons.

### Building a simple ML model with Tensorflow

**a. Installing Tensorflow in the python environment**

```
!pip install tensorflow==2.0.0
```

**b. Importing Tensorflow in the notebook**

```
import tensorflow as tf
```

**c. Loading the MNIST Digits dataset available in TF library**

```
mnist = tf.keras.datasets.mnist
```

**d. Splitting the dataset into training-testing and normalizing the pixels by dividing with 255**

```
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train, x_test = x_train/255.0, x_test/255.0
```

**e. Building a simple Convolutional Neural Network with 1 Hidden layer (having 128 neurons) and 1 Output layer (having 10 neurons)**

```
model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(128, activation='relu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10, activation='softmax')
])
```

**f. Configuring the model for training with the following:**

Optimizer - Adam

Loss Function - Sparse Categorical Cross-entropy

Evaluation Metrics - Accuracy

```
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
```

**g. Training the Image-Classifier model on the Train dataset (with five iterations)**

```
model.fit(x_train, y_train, epochs=5)
```

**h. Evaluating the model with the Test dataset**

```
model.evaluate(x_test, y_test)
```

**Output:**

**Result:** The model predicts results on the unseen data with close to 98% accuracy.

## Tensorflow Applications

Tensorflow has many applications because it makes image augmentation, complex model training & many more deep learning tasks easier to implement. Check out __this__ blog to learn more about that.

### Real-World systems using Tensorflow

Nowadays, tech-giant companies like Airbnb, Lenovo, Intel, Google, Cocacola, Twitter, MI, NVIDIA, Uber, Qualcomm, and many more are using Tensorflow.

Google uses TensorFlow in many of its products like Google Translate, Google Search, GMAIL, etc.

Paypal is using the Machine Learning capabilities of Tensorflow for the task of Fraud Detection in online transactions. Customers feel safe and secure when these cutting-edge technologies are deployed to protect their bank accounts.

Spotify recommends songs and podcasts to its users by training a machine learning model using their customerâ€™s previous data. The machine learning infrastructure of Spotify is built on top of Tensorflow.

Airbus extracts information from the satellite images and delivers good insights to its clients using Tensorflow.