To get the most out of this book
- Deep learning and Python: The reader should have a fundamental knowledge of deep learning and its implementation in Python. While previous experience in using Keras to implement deep learning algorithms is important, it is not required. Chapter 1, Introducing Advanced Deep Learning with Keras offers a review of deep learning concepts and their implementation in Keras.
- Math: The discussions in this book assume that the reader is familiar with calculus, linear algebra, statistics, and probability at the college level.
- GPU: Majority of the Keras implementations in this book require GPU. Without GPU, it is not practical to execute many of the code examples because of the time involved (many hours to days). The examples in this book use reasonable data size as much as possible in order to minimize the use of high-performance computers. The reader is expected to have access to at least NVIDIA GTX 1060.
- Editor: The code examples in this book were edited using
vim
in Ubuntu Linux 16.04 LTS, Ubuntu Linux 17.04, and macOS High Sierra. Any Python-aware text editor is acceptable. - Tensorflow: Keras requires a backend. The code examples in this book were written in Keras with TensorFlow backend. Please ensure that the GPU driver and
tensorflow
are both installed properly. - GitHub: We learn by example and experimentation. Please
git pull
orfork
the code bundle for the book from its GitHub repository. After getting the code, examine it. Run it. Change it. Run it again. Do all creative experiments by tweaking the code examples. It is the only way to appreciate all the theories explained in the chapters. Giving a star on the book GitHub repository is also highly appreciated.
Download the example code files
The code bundle for the book is hosted on GitHub at
https://github.com/PacktPublishing/Advanced-Deep-Learning-with-Keras
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: http://www.packtpub.com/sites/default/files/downloads/9781788629416_ColorImages.pdf.
Conventions used
The code examples in this book are in Python. More specifically, python3
. The color scheme is based on vim syntax highlighting. Consider the following example:
def encoder_layer(inputs, filters=16, kernel_size=3, strides=2, activation='relu', instance_norm=True): """Builds a generic encoder layer made of Conv2D-IN-LeakyReLU IN is optional, LeakyReLU may be replaced by ReLU """ conv = Conv2D(filters=filters, kernel_size=kernel_size, strides=strides, padding='same') x = inputs if instance_norm: x = InstanceNormalization()(x) if activation == 'relu': x = Activation('relu')(x) else: x = LeakyReLU(alpha=0.2)(x) x = conv(x) return x
Whenever possible, docstring is included. At the very least, text comment is used to minimize space usage.
Any command-line code execution is written as follows:
$ python3 dcgan-mnist-4.2.1.py
The example code file naming is: algorithm-dataset-chapter.section.number.py
. The command-line example is DCGAN on MNIST dataset in Chapter 4, second section and first listing. In some cases, the explicit command line to execute is not written but it is assumed to be:
$ python3 name-of-the-file-in-listing
The file name of the code example is included in the Listing caption.