May 2018
Intermediate to advanced
576 pages
14h 42m
English
In this example, we are going to use a Python library freely available on GitHub (https://github.com/albertbup/deep-belief-network) that allows working with supervised and unsupervised DBN using NumPy (CPU-only) or Tensorflow (CPU or GPU support) with the standard Scikit-Learn interface. Our goal is to create a lower-dimensional representation of a subset of the mnist dataset (as the training process can be quite slow, we'll limit it to 400 samples). The first step is loading (using the Keras helper function), shuffling, and normalizing the dataset:
import numpy as npfrom keras.datasets import mnistfrom sklearn.utils import shuffle(X_train, Y_train), (_, _) = mnist.load_data()X_train, Y_train = shuffle(X_train, ...
Read now
Unlock full access