tf.estimator.export.PredictOutput
Stay organized with collections
Save and categorize content based on your preferences.
Represents the output of a generic prediction head.
Inherits From: ExportOutput
tf.estimator.export.PredictOutput(
outputs
)
A generic prediction need not be either a classification or a regression.
Named outputs must be provided as a dict from string to Tensor
,
Args |
outputs
|
A Tensor or a dict of string to Tensor representing the
predictions.
|
Raises |
ValueError
|
if the outputs is not dict, or any of its keys are not
strings, or any of its values are not Tensor s.
|
Methods
as_signature_def
View source
as_signature_def(
receiver_tensors
)
Generate a SignatureDef proto for inclusion in a MetaGraphDef.
The SignatureDef will specify outputs as described in this ExportOutput,
and will use the provided receiver_tensors as inputs.
Args |
receiver_tensors
|
a Tensor , or a dict of string to Tensor , specifying
input nodes that will be fed.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.estimator.export.PredictOutput\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/estimator/export/PredictOutput) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/saved_model/model_utils/export_output.py#L202-L232) |\n\nRepresents the output of a generic prediction head.\n\nInherits From: [`ExportOutput`](../../../tf/estimator/export/ExportOutput)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.estimator.export.PredictOutput`](/api_docs/python/tf/estimator/export/PredictOutput), \\`tf.compat.v2.estimator.export.PredictOutput\\`\n\n\u003cbr /\u003e\n\n tf.estimator.export.PredictOutput(\n outputs\n )\n\nA generic prediction need not be either a classification or a regression.\n\nNamed outputs must be provided as a dict from string to `Tensor`,\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------|--------------------------------------------------------------------------|\n| `outputs` | A `Tensor` or a dict of string to `Tensor` representing the predictions. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|---------------------------------------------------------------------------------------------------------|\n| `ValueError` | if the outputs is not dict, or any of its keys are not strings, or any of its values are not `Tensor`s. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-----------|---------------|\n| `outputs` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `as_signature_def`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/saved_model/model_utils/export_output.py#L230-L232) \n\n as_signature_def(\n receiver_tensors\n )\n\nGenerate a SignatureDef proto for inclusion in a MetaGraphDef.\n\nThe SignatureDef will specify outputs as described in this ExportOutput,\nand will use the provided receiver_tensors as inputs.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|--------------------|---------------------------------------------------------------------------------------|\n| `receiver_tensors` | a `Tensor`, or a dict of string to `Tensor`, specifying input nodes that will be fed. |\n\n\u003cbr /\u003e"]]