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

Function run_main

tensorflow/lite/python/tflite_convert.py:492–511  ·  view source on GitHub ↗

Main in toco_convert.py.

(_)

Source from the content-addressed store, hash-verified

490
491
492def run_main(_):
493 """Main in toco_convert.py."""
494 if tf2.enabled():
495 parser = _get_tf2_parser()
496 else:
497 parser = _get_tf1_parser()
498
499 tflite_flags, unparsed = parser.parse_known_args(args=sys.argv[1:])
500
501 if tf2.enabled():
502 _convert_tf2_model(tflite_flags)
503 else:
504 try:
505 _check_tf1_flags(tflite_flags, unparsed)
506 except ValueError as e:
507 parser.print_usage()
508 file_name = os.path.basename(sys.argv[0])
509 sys.stderr.write("{0}: error: {1}\n".format(file_name, str(e)))
510 sys.exit(1)
511 _convert_tf1_model(tflite_flags)
512
513
514def main():

Callers

nothing calls this directly

Calls 9

_get_tf2_parserFunction · 0.85
_get_tf1_parserFunction · 0.85
_convert_tf2_modelFunction · 0.85
_check_tf1_flagsFunction · 0.85
_convert_tf1_modelFunction · 0.85
parse_known_argsMethod · 0.80
exitMethod · 0.80
writeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected