Finally, we need the logits layer, which will take the output of the fully connected layer and then produce the raw prediction values. For example, in the case of the digit classification, the output will be a tensor of 10 values, where each value represents the score of one class from 0-9. So, let's define this logit layer for the digit classification example, where we need 10 outputs only, and with linear activation, which is the default for the dense() function of TensorFlow:
logits_layer = tf.layers.dense(inputs=dense_layer, units=10)
The final output of this logits layer will be a tensor ...