tf.estimator.FinalExporter

Class FinalExporter

This class exports the serving graph and checkpoints at the end.

Inherits From: Exporter

Aliases:

  • Class tf.compat.v1.estimator.FinalExporter
  • Class tf.compat.v2.estimator.FinalExporter
  • Class tf.estimator.FinalExporter

Defined in python/estimator/exporter.py.

This class performs a single export at the end of training.

__init__

__init__(
    name,
    serving_input_receiver_fn,
    assets_extra=None,
    as_text=False
)

Create an Exporter to use with tf.estimator.EvalSpec.

Args:

  • name: unique name of this Exporter that is going to be used in the export path.
  • serving_input_receiver_fn: a function that takes no arguments and returns a ServingInputReceiver.
  • assets_extra: An optional 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'}.
  • as_text: whether to write the SavedModel proto in text format. Defaults to False.

Raises:

  • ValueError: if any arguments is invalid.

Properties

name

Methods

export

export(
    estimator,
    export_path,
    checkpoint_path,
    eval_result,
    is_the_final_export
)