diff options
Diffstat (limited to 'tensorflow/g3doc/api_docs/python/contrib.learn.md')
-rw-r--r-- | tensorflow/g3doc/api_docs/python/contrib.learn.md | 111 |
1 files changed, 110 insertions, 1 deletions
diff --git a/tensorflow/g3doc/api_docs/python/contrib.learn.md b/tensorflow/g3doc/api_docs/python/contrib.learn.md index d90b6b1a53..13f2f8c9d4 100644 --- a/tensorflow/g3doc/api_docs/python/contrib.learn.md +++ b/tensorflow/g3doc/api_docs/python/contrib.learn.md @@ -5360,6 +5360,90 @@ Export utilities - - - +### `class tf.contrib.learn.InputFnOps` {#InputFnOps} + +A return type for an input_fn. + +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. +- - - + +#### `tf.contrib.learn.InputFnOps.__getnewargs__()` {#InputFnOps.__getnewargs__} + +Return self as a plain tuple. Used by copy and pickle. + + +- - - + +#### `tf.contrib.learn.InputFnOps.__getstate__()` {#InputFnOps.__getstate__} + +Exclude the OrderedDict from pickling + + +- - - + +#### `tf.contrib.learn.InputFnOps.__new__(_cls, features, labels, default_inputs)` {#InputFnOps.__new__} + +Create new instance of InputFnOps(features, labels, default_inputs) + + +- - - + +#### `tf.contrib.learn.InputFnOps.__repr__()` {#InputFnOps.__repr__} + +Return a nicely formatted representation string + + +- - - + +#### `tf.contrib.learn.InputFnOps.default_inputs` {#InputFnOps.default_inputs} + +Alias for field number 2 + + +- - - + +#### `tf.contrib.learn.InputFnOps.features` {#InputFnOps.features} + +Alias for field number 0 + + +- - - + +#### `tf.contrib.learn.InputFnOps.labels` {#InputFnOps.labels} + +Alias for field number 1 + + + +- - - + +### `class tf.contrib.learn.ProblemType` {#ProblemType} + +Enum-like values for the type of problem that the model solves. + +These values are used when exporting the model to produce the appropriate +signature function for serving. + +The following values are supported: + UNSPECIFIED: Produces a predict signature_fn. + CLASSIFICATION: Produces a classify signature_fn. + LINEAR_REGRESSION: Produces a regression signature_fn. + LOGISTIC_REGRESSION: Produces a classify signature_fn. + +- - - + ### `tf.contrib.learn.build_parsing_serving_input_fn(feature_spec, default_batch_size=None)` {#build_parsing_serving_input_fn} Build an input_fn appropriate for serving, expecting fed tf.Examples. @@ -5383,8 +5467,33 @@ for use at serving time, so the labels return value is always None. - - - -### `class tf.contrib.learn.ProblemType` {#ProblemType} +### `tf.contrib.learn.make_export_strategy(serving_input_fn, default_output_alternative_key=None, assets_extra=None, as_text=False, exports_to_keep=5)` {#make_export_strategy} + +Create an ExportStrategy for use with Experiment. + +##### Args: + + +* <b>`serving_input_fn`</b>: A function that takes no arguments and returns an + `InputFnOps`. +* <b>`default_output_alternative_key`</b>: the name of the head to serve when an + incoming serving request does not explicitly request a specific head. + Not needed for single-headed models. +* <b>`assets_extra`</b>: A dict specifying how to populate the assets.extra directory + within the exported SavedModel. Each key should give the destination + path (including the filename) relative to the assets.extra directory. + The corresponding value gives the full path of the source file to be + copied. For example, the simple case of copying a single file without + renaming it is specified as + `{'my_asset_file.txt': '/path/to/my_asset_file.txt'}`. +* <b>`as_text`</b>: whether to write the SavedModel proto in text format. +* <b>`exports_to_keep`</b>: Number of exports to keep. Older exports will be + garbage-collected. Defaults to 5. Set to None to disable garbage + collection. + +##### Returns: + An ExportStrategy that can be passed to the Experiment constructor. |