ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more


View source on GitHub

Decodes the prediction of an ImageNet model.

preds Numpy array encoding a batch of predictions.
top Integer, how many top-guesses to return. Defaults to 5.

A list of lists of top class prediction tuples (class_name, class_description, score). One list of tuples per sample in batch input.

ValueError In case of invalid shape of the pred array (must be 2D).