Decodes the prediction of an ImageNet model.
View aliases
Compat aliases for migration
See Migration guide for more details.
tf.keras.applications.xception.decode_predictions(
preds, top=5
)
Arguments | |
---|---|
preds
|
Numpy array encoding a batch of predictions. |
top
|
Integer, how many top-guesses to return. Defaults to 5. |
Returns | |
---|---|
A list of lists of top class prediction tuples
(class_ .
One list of tuples per sample in batch input.
|
Raises | |
---|---|
ValueError
|
In case of invalid shape of the pred array
(must be 2D).
|