April 2017
Intermediate to advanced
320 pages
7h 46m
English
In a second file, we create the following script to restore the deployed network.
Let's start by loading the required libraries:
import matplotlib.pyplot as plt import tensorflow as tf import input_data import numpy as np import mnist_data
And then by adding the MNIST dataset using the following:
mnist = mnist_data.read_data_sets('data', one_hot=True)
Implement an interactive session:
sess = tf.InteractiveSession()
The following line imports the meta graph saved, which contains all the information we need on the topology of the model and its variables:
new_saver = tf.train.import_meta_graph('softmax_mnist.ckpt.meta')
Then import the checkpoint file, which contains the weights we developed during training:
new_saver.restore(sess, ...
Read now
Unlock full access