Merge pull request #37529 from howl-anderson:docs/update_doc_for_import_pb_to_tensorboard

PiperOrigin-RevId: 303970474
Change-Id: I24076a7b452f4746cab28378a7eade5d23592dc7
This commit is contained in:
TensorFlower Gardener 2020-03-31 08:34:20 -07:00
commit 5a39b05cf4

View File

@ -41,19 +41,17 @@ except ImportError:
def import_to_tensorboard(model_dir, log_dir, tag_set):
"""View an imported protobuf model (`.pb` file) as a graph in Tensorboard.
"""View an SavedModel as a graph in Tensorboard.
Args:
model_dir: The location of the protobuf (`pb`) model to visualize
model_dir: The directory containing the SavedModel to import.
log_dir: The location for the Tensorboard log to begin visualization from.
tag_set: Group of tag(s) of the MetaGraphDef to load, in string format,
separated by ','. For tag-set contains multiple tags, all tags must be
passed in.
Usage:
Call this function with your model location and desired log directory.
Launch Tensorboard by pointing it to the log directory.
View your imported `.pb` model as a graph.
separated by ','. For tag-set contains multiple tags, all tags must be
passed in.
Usage: Call this function with your SavedModel location and desired log
directory. Launch Tensorboard by pointing it to the log directory. View your
imported SavedModel as a graph.
"""
with session.Session(graph=ops.Graph()) as sess:
input_graph_def = saved_model_utils.get_meta_graph_def(model_dir,