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:
commit
5a39b05cf4
@ -41,19 +41,17 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
def import_to_tensorboard(model_dir, log_dir, tag_set):
|
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:
|
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.
|
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,
|
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
|
separated by ','. For tag-set contains multiple tags, all tags must be
|
||||||
passed in.
|
passed in.
|
||||||
|
Usage: Call this function with your SavedModel location and desired log
|
||||||
Usage:
|
directory. Launch Tensorboard by pointing it to the log directory. View your
|
||||||
Call this function with your model location and desired log directory.
|
imported SavedModel as a graph.
|
||||||
Launch Tensorboard by pointing it to the log directory.
|
|
||||||
View your imported `.pb` model as a graph.
|
|
||||||
"""
|
"""
|
||||||
with session.Session(graph=ops.Graph()) as sess:
|
with session.Session(graph=ops.Graph()) as sess:
|
||||||
input_graph_def = saved_model_utils.get_meta_graph_def(model_dir,
|
input_graph_def = saved_model_utils.get_meta_graph_def(model_dir,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user