
Advanced Deep Learning with Keras
By :

vim
in Ubuntu Linux 16.04 LTS, Ubuntu Linux 17.04, and macOS High Sierra. Any Python-aware text editor is acceptable.tensorflow
are both installed properly.git pull
or fork
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.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!
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.
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.