MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / run_main

Function run_main

tensorflow/python/tools/freeze_graph.py:381–487  ·  view source on GitHub ↗

Main function of freeze_graph.

()

Source from the content-addressed store, hash-verified

379
380
381def run_main():
382 """Main function of freeze_graph."""
383 parser = argparse.ArgumentParser()
384 parser.register("type", "bool", lambda v: v.lower() == "true")
385 parser.add_argument(
386 "--input_graph",
387 type=str,
388 default="",
389 help="TensorFlow \'GraphDef\' file to load.")
390 parser.add_argument(
391 "--input_saver",
392 type=str,
393 default="",
394 help="TensorFlow saver file to load.")
395 parser.add_argument(
396 "--input_checkpoint",
397 type=str,
398 default="",
399 help="TensorFlow variables file to load.")
400 parser.add_argument(
401 "--checkpoint_version",
402 type=int,
403 default=2,
404 help="Tensorflow variable file format")
405 parser.add_argument(
406 "--output_graph",
407 type=str,
408 default="",
409 help="Output \'GraphDef\' file name.")
410 parser.add_argument(
411 "--input_binary",
412 nargs="?",
413 const=True,
414 type="bool",
415 default=False,
416 help="Whether the input files are in binary format.")
417 parser.add_argument(
418 "--output_node_names",
419 type=str,
420 default="",
421 help="The name of the output nodes, comma separated.")
422 parser.add_argument(
423 "--restore_op_name",
424 type=str,
425 default="save/restore_all",
426 help="""\
427 The name of the master restore operator. Deprecated, unused by updated \
428 loading code.
429 """)
430 parser.add_argument(
431 "--filename_tensor_name",
432 type=str,
433 default="save/Const:0",
434 help="""\
435 The name of the tensor holding the save path. Deprecated, unused by \
436 updated loading code.
437 """)
438 parser.add_argument(

Callers 1

freeze_graph.pyFile · 0.70

Calls 5

add_argumentMethod · 0.80
parse_known_argsMethod · 0.80
mainFunction · 0.70
registerMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected