16.03.2021 Views

Advanced Deep Learning with Keras

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introducing Advanced Deep Learning with Keras

The next step for us is to then install Keras:

$ sudo pip3 install keras

The examples presented in this book will require additional packages, such as

pydot, pydot_ng, vizgraph, python3-tk and matplotlib. We'll need to install these

packages before proceeding beyond this chapter.

The following should not generate any error if both TensorFlow and Keras are

installed along with their dependencies:

$ python3

>>> import tensorflow as tf

>>> message = tf.constant('Hello world!')

>>> session = tf.Session()

>>> session.run(message)

b'Hello world!'

>>> import keras.backend as K

Using TensorFlow backend.

>>> print(K.epsilon())

1e-07

The warning message about SSE4.2 AVX AVX2 FMA, which is similar to the one

below can be safely ignored. To remove the warning message, you'll need to

recompile and install the TensorFlow source code from https://github.com/

tensorflow/tensorflow.

tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports

instructions that this TensorFlow binary was not compiled to use:

SSE4.2 AVX AVX2 FMA

This book does not cover the complete Keras API. We'll only be covering the

materials needed to explain the advanced deep learning topics in this book. For

further information, we can consult the official Keras documentation, which can

be found at https://keras.io.

Implementing the core deep learning

models - MLPs, CNNs, and RNNs

We've already mentioned that we'll be using three advanced deep learning models,

they are:

• MLPs: Multilayer perceptrons

[ 4 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!