January 2018
Intermediate to advanced
310 pages
7h 48m
English
Bottleneck features are the values computed in the pre-classification layer. In this section, we will see how to extract the bottleneck features from a pre-trained model using TensorFlow. Let's start by importing the required libraries, using the following code:
import osimport urllib.requestfrom tensorflow.python.platform import gfileimport tarfile
Then, we need to download the pre-trained model with the graph definition and its weights. TensorFlow has trained a model on the ImageNet dataset using inception architecture and provided the model. We will download this model and unzip it into a local folder, using the following code:
model_url = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz' ...
Read now
Unlock full access