The basic optimizer of TensorFlow is −

```
tf.train.Optimizer
```

This class is defined in the specified path of tensorflow/python/training/optimizer.py.

Following are some optimizers in Tensorflow −

We will focus on the Stochastic Gradient descent. The illustration for creating optimizer for the same is mentioned below −

```
def sgd(cost, params, lr = np.float32(0.01>
```

>

:
g_params = tf.gradients(cost, params>

updates = []
for param, g_param in zip(params, g_params>

:
updates.append(param.assign(param - lr*g_param>

>

return updates

The basic parameters are defined within the specific function. In our subsequent chapter, we will focus on Gradient Descent Optimization with implementation of optimizers.

End. Today you've effectively introduced TensorFlow with GPU support on a M1 Pro MacBook.

pip install tensorflow=1.13.1 Code here

Syntax: tf.zeros(shape, dataType>

Parameters: shape: It takes the shape of the tensor we are going to generate. dataType: It is the type of tensor in the resulting element. It can be a 'float32′, 'int32′ or 'bool'.