Skip to content

Instantly share code, notes, and snippets.

@TzuChiehHung
Last active September 23, 2019 00:48
Show Gist options
  • Save TzuChiehHung/a65645bc7dfc8cbaa57cbcfbaae6563b to your computer and use it in GitHub Desktop.
Save TzuChiehHung/a65645bc7dfc8cbaa57cbcfbaae6563b to your computer and use it in GitHub Desktop.
[Argument parser] #python
from argparse import ArgumentParser
if __name__ == '__main__':
parser = ArgumentParser(description='')
parser.add_argument('position', type=str, help='position argument')
parser.add_argument('-o', '--optional', type=str, default='some string', help='optional argument')
parser.add_argument('-l', '--optional', type=int, nargs='+', help='parse a list')
parser.add_argument('-b', '--boolean', action='store_true', dest='visual', help='Show image frame')
parser.add_argument('-m', '--model', dest='model_name', type=str, default='resnet50', help='[resnet50] / inception_v3')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment