Getting started with Keras and TensorFlow
There are many libraries dedicated to deep learning, and we will be using Keras, a Python library that uses multiple backends; we will be using TensorFlow as a backend. While the code is specific to Keras, the principles can apply to any other libraries.
Requirements
Before starting, you need to install at least TensorFlow and Keras, using pip
:
pip install tensorflow pip install keras
We are using TensorFlow 2.2, which has integrated GPU support, but if you are using TensorFlow version 1.15 or older, you need to install a separate package to take advantage of a GPU:
pip install tensorflow-gpu
I would recommend using the most recent versions of both TensorFlow and Keras.
Before starting, let's make sure that everything is in order. You probably want to use a GPU, to speed up training. Unfortunately, getting TensorFlow to use your GPU is not necessarily straightforward; for example, it is very picky with the version...