W3cubDocs

/TensorFlow Python

tf.contrib.learn.InputFnOps

Class InputFnOps

Defined in tensorflow/contrib/learn/python/learn/utils/input_fn_utils.py.

A return type for an input_fn (deprecated).

THIS CLASS IS DEPRECATED. Please use tf.estimator.export.ServingInputReceiver instead.

This return type is currently only supported for serving input_fn. Training and eval input_fn should return a (features, labels) tuple.

The expected return values are: features: A dict of string to Tensor or SparseTensor, specifying the features to be passed to the model. labels: A Tensor, SparseTensor, or a dict of string to Tensor or SparseTensor, specifying labels for training or eval. For serving, set labels to None. default_inputs: a dict of string to Tensor or SparseTensor, specifying the input placeholders (if any) that this input_fn expects to be fed. Typically, this is used by a serving input_fn, which expects to be fed serialized tf.Example protos.

Properties

default_inputs

Alias for field number 2

features

Alias for field number 0

labels

Alias for field number 1

Methods

__new__

__new__(
    _cls,
    features,
    labels,
    default_inputs
)

Create new instance of InputFnOps(features, labels, default_inputs)

© 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/contrib/learn/InputFnOps