TensorFlow Core

Diving into TensorFlow ;)

Source: https://www.tensorflow.org/get_started/get_started

The central unit of data in TensorFlow is the tensor. A tensor consists of a set of primitive values shaped into an array of any number of dimensions. A tensor's rank is its number of dimensions. A tensor's shape is number of element in each dimension

computational graph is a series of TensorFlow operations arranged into a graph of nodes.

A graph can be parameterized to accept external inputs, known as placeholders. A placeholder is a promise to provide a value later.

To make the model trainable, we need to be able to modify the graph to get new outputs with the same input. Variables allow us to add trainable parameters to a graph. Use tf.assign to change value of variable

TensorFlow provides optimizersthat slowly change each variable in  order to minimize the loss function. The simplest optimizer is gradient descent.

View notebook:
https://github.com/hhoangnguyen/notebook/blob/master/tensorflow/getting_started/TensorFlow%20Core.ipynb

View equivalent python code:
https://github.com/hhoangnguyen/notebook/blob/master/tensorflow/getting_started/tensorflow_core_equivalent.py

Comments