See the task summary for tasks supported by an [AutoModel] class.

Now pass your preprocessed batch of inputs directly to the model. You can pass the tensors as-is:

tf_outputs = tf_model(tf_batch)

The model outputs the final activations in the logits attribute. Apply the softmax function to the logits to retrieve the probabilities:

import tensorflow as tf
tf_predictions = tf.nn.softmax(tf_outputs.logits, axis=-1)
tf_predictions  # doctest: +IGNORE_RESULT