TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.meta_graph_transform.meta_graph_transform.meta_graph_transform

View source on GitHub

Apply the Graph Transform tool to a MetaGraphDef.

tf.contrib.meta_graph_transform.meta_graph_transform.meta_graph_transform(
    base_meta_graph_def,
    input_names,
    output_names,
    transforms,
    tags,
    checkpoint_path=None
)

Args:

  • base_meta_graph_def: A MetaGraphDef protocol buffer to transform.
  • input_names: Names of input nodes.
  • output_names: Names of output nodes.
  • transforms: A list of strings naming the graph transforms to be applied in order. These transform names are exactly those supported by the Graph Transform Tool, with the addition of the 'freeze_graph' and 'sparsify_gather' transforms.
  • tags: A list of tags with which to annotate the transformed MetaGraphDef.
  • checkpoint_path: A path to a checkpoint to restore during freezing, if needed (default None).

Returns:

A new transformed MetaGraphDef protocol buffer.