Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfx.components.trainer.rewriting.rewriter.BaseRewriter

View source on GitHub

Base class from which all rewriters should inherit.

Attributes:

  • name: Name of the rewriter.

    Should not be None nor empty.

Methods

perform_rewrite

View source

perform_rewrite(
    original_model, rewritten_model
)

Invoke all validations and perform the rewrite.

Args:

  • original_model: A base_rewriter.ModelDescription object describing the original model.
  • rewritten_model: A base_rewriter.ModelDescription object describing the location and type of the rewritten model.

Raises:

  • ValueError: if the model was not successfully rewritten.