TensorFlow
TensorFlow is the library for machine learning and deep learning developed by Google. The project page is https://www.tensorflow.org/ and all the code is open to the public on GitHub at https://github.com/tensorflow/tensorflow. TensorFlow itself is written with C++, but it provides a Python and C++ API. We focus on Python implementations in this book. The installation can be done with pip
, virtualenv
, or docker
. The installation guide is available at https://www.tensorflow.org/versions/master/get_started/os_setup.html. After the installation, you can import and use TensorFlow by writing the following code:
import tensorflow as tf
TensorFlow recommends you implement deep learning code with the following three parts:
inference()
: This makes predictions using the given data, which defines the model structureloss()
: This returns the error values to be optimizedtraining()
: This applies the actual training algorithms by computing gradients
We'll follow this guideline. A tutorial on...