Parses command line arguments.
()
| 324 | |
| 325 | |
| 326 | def parse_args(): |
| 327 | """Parses command line arguments.""" |
| 328 | parser = argparse.ArgumentParser() |
| 329 | parser.add_argument( |
| 330 | "--model_file", |
| 331 | type=str, |
| 332 | default="", |
| 333 | help="pb file to load.") |
| 334 | parser.add_argument( |
| 335 | "--output_dir", |
| 336 | type=str, |
| 337 | default="", |
| 338 | help="Directory to save the output graph to.") |
| 339 | parser.add_argument( |
| 340 | "--layers", |
| 341 | type=str, |
| 342 | default="-1", |
| 343 | help="'start_layer:end_layer' or 'layer', similar to python slice." |
| 344 | " Use with --validate flag.") |
| 345 | return parser.parse_known_args() |
| 346 | |
| 347 | |
| 348 | if __name__ == '__main__': |