W3cubDocs

/TensorFlow Python

tf.keras.applications.densenet.decode_predictions

Aliases:

  • tf.keras.applications.densenet.decode_predictions
  • tf.keras.applications.inception_resnet_v2.decode_predictions
  • tf.keras.applications.inception_v3.decode_predictions
  • tf.keras.applications.mobilenet.decode_predictions
  • tf.keras.applications.nasnet.decode_predictions
  • tf.keras.applications.resnet50.decode_predictions
  • tf.keras.applications.vgg16.decode_predictions
  • tf.keras.applications.vgg19.decode_predictions
  • tf.keras.applications.xception.decode_predictions
tf.keras.applications.densenet.decode_predictions(
    preds,
    top=5
)

Defined in tensorflow/python/keras/_impl/keras/applications/imagenet_utils.py.

Decodes the prediction of an ImageNet model.

Arguments:

  • preds: Numpy tensor encoding a batch of predictions.
  • top: Integer, how many top-guesses to return.

Returns:

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

Raises:

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

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/applications/densenet/decode_predictions