Deep Learning, Data Science, Machine Learning, Artificial Intelligence, Python.
class label _, predicted_idx = torch.max(output, 1) predicted_label = labels[predicted_idx.item()] TensorFlow Code Sample: import tensorflow as tf from tensorflow import keras # Load pre-trained ResNet model model = keras.applications.ResNet50(weights='imagenet') # Prepare input image input_image =