January 2018
Intermediate to advanced
474 pages
10h 23m
English
The image classification is the same as explained in the previous section using the VGG 16 model. The full code for the Inception v3 model is as follows:
x_p = tf.placeholder(shape=(None, image_height, image_width, 3 ), dtype=tf.float32, name='x_p')with slim.arg_scope(inception.inception_v3_arg_scope()): logits,_ = inception.inception_v3(x_p, num_classes=inet.n_classes, is_training=False )probabilities = tf.nn.softmax(logits)init = slim.assign_from_checkpoint_fn( os.path.join(model_home, '{}.ckpt'.format(model_name)), slim.get_variables_to_restore())with tf.Session() as tfs: init(tfs) probs = tfs.run([probabilities],feed_dict={x_p:images_test}) probs=probs[0]
Let us see how our model ...
Read now
Unlock full access