# tf.keras.applications.nasnet.decode_predictions

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v2.13.1/keras/applications/nasnet.py#L900-L902) |

Decodes the prediction of an ImageNet model.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

\`tf.compat.v1.keras.applications.nasnet.decode_predictions\`

<br />

    tf.keras.applications.nasnet.decode_predictions(
        preds, top=5
    )

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | In case of invalid shape of the `pred` array (must be 2D). |

<br />