Aliases:
tf.contrib.gan.eval.classifier_metrics.run_inception
tf.contrib.gan.eval.run_inception
tf.contrib.gan.eval.run_inception(
images,
graph_def=None,
default_graph_def_fn=_default_graph_def_fn,
image_size=INCEPTION_DEFAULT_IMAGE_SIZE,
input_tensor=INCEPTION_INPUT,
output_tensor=INCEPTION_OUTPUT
)
Defined in tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py
.
Run images through a pretrained Inception classifier.
Args:
images
: Input tensors. Must be [batch, height, width, channels]. Input shape and values must be in [-1, 1], which can be achieved usingpreprocess_image
.graph_def
: A GraphDef proto of a pretrained Inception graph. IfNone
, calldefault_graph_def_fn
to get GraphDef.default_graph_def_fn
: A function that returns a GraphDef. Used ifgraph_def
is `None. By default, returns a pretrained InceptionV3 graph.image_size
: Required image width and height. See unit tests for the default values.input_tensor
: Name of input Tensor.output_tensor
: Name or list of output Tensors. This function will compute activations at the specified layer. Examples include INCEPTION_V3_OUTPUT and INCEPTION_V3_FINAL_POOL which would result in this function computing the final logits or the penultimate pooling layer.
Returns:
Tensor or Tensors corresponding to computed output_tensor
.
Raises:
ValueError
: If images are not the correct size.ValueError
: If neithergraph_def
nordefault_graph_def_fn
are provided.