O'Reilly logo

Deep Learning By Example by Ahmed Menshawy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Model building and training

So, let's start off by specifying the input placeholder variables that will be fed to our neural network model. The shape of the first input variable (which will contain the extracted transfer values) will be [None, transfer_len]. The second placeholder variable will hold the actual class labels of the training set in a one-hot vector format:

transferValues_arrLength = inception_model.transfer_leninput_values = tf.placeholder(tf.float32, shape=[None, transferValues_arrLength], name='input_values')y_actual = tf.placeholder(tf.float32, shape=[None, num_classes], name='y_actual')

We can also get the corresponding integer value of each class from 1 to 10 by defining another placeholder variable:

y_actual_cls = ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required