tf.estimator.BestExporter

View source on GitHub

This class exports the serving graph and checkpoints of the best models.

Inherits From: Exporter

tf.estimator.BestExporter(
    name='best_exporter', serving_input_receiver_fn=None,
    event_file_pattern='eval/*.tfevents.*', compare_fn=_loss_smaller,
    assets_extra=None, as_text=False, exports_to_keep=5
)

This class performs a model export everytime the new model is better than any existing model.

Args:

Attributes:

Raises:

Methods

export

View source

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

Exports the given Estimator to a specific format.

Args:

Returns:

The string path to the exported directory or None if export is skipped.