Performance measures

For showing the output, let's define a variable to check whether the predicted class is equal to the true one:

model_correct_prediction = tf.equal(y_predicted_cls_integer, y_actual_cls_integer)

Calculate the model accuracy by casting the boolean values then averaging them to sum the correctly classified ones:

model_accuracy = tf.reduce_mean(tf.cast(model_correct_prediction, tf.float32))
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset