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

Function _get_tf2_parser

tensorflow/lite/python/tflite_convert.py:467–489  ·  view source on GitHub ↗

Returns ArgumentParser for tflite_convert for TensorFlow 2.0.

()

Source from the content-addressed store, hash-verified

465
466
467def _get_tf2_parser():
468 """Returns ArgumentParser for tflite_convert for TensorFlow 2.0."""
469 parser = argparse.ArgumentParser(
470 description=("Command line tool to run TensorFlow Lite Converter."))
471
472 # Output file flag.
473 parser.add_argument(
474 "--output_file",
475 type=str,
476 help="Full filepath of the output file.",
477 required=True)
478
479 # Input file flags.
480 input_file_group = parser.add_mutually_exclusive_group(required=True)
481 input_file_group.add_argument(
482 "--saved_model_dir",
483 type=str,
484 help="Full path of the directory containing the SavedModel.")
485 input_file_group.add_argument(
486 "--keras_model_file",
487 type=str,
488 help="Full filepath of HDF5 file containing tf.Keras model.")
489 return parser
490
491
492def run_main(_):

Callers 1

run_mainFunction · 0.85

Calls 1

add_argumentMethod · 0.80

Tested by

no test coverage detected