'Prediction tensors from inputs tensor.
Args:
preprocessed_inputs: a [batch, 28, 28, channels] float32 tensor.
Returns:
prediction_dict: a dictionary holding prediction tensors to be
passed to the Loss or Postprocess functions.'

def predict(self, preprocessed_inputs):

    flattened_inputs = tf.contrib.layers.flatten(preprocessed_inputs)
    class_prediction = tf.contrib.layers.fully_connected(flattened_inputs, self._num_classes)
    box_prediction = tf.contrib.layers.fully_connected(flattened_inputs, 4)
    return {'class_predictions_with_background': tf.reshape(class_prediction, [(-1), 1, self._num_classes]), 'box_encodings': tf.reshape(box_prediction, [(-1), 1, 4])}
