parameters: ()
return_statement: return args
docstring: Parse input arguments
docstring_summary: Parse input arguments
docstring_tokens: Parse input arguments
function: def parse_args():
      """
      Parse input arguments
      """
      parser = argparse.ArgumentParser(description='Train a Faster R-CNN network')
      parser.add_argument('--gpu', dest='gpu_id',
                          help='GPU device id to use [0]',
                          default=0, type=int)
      parser.add_argument('--net_name', dest='net_name',
                          help='network name (e.g., "ZF")',
                          default=None, type=str)
      parser.add_argument('--weights', dest='pretrained_model',
                          help='initialize with pretrained model weights',
                          default=None, type=str)
      parser.add_argument('--cfg', dest='cfg_file',
                          help='optional config file',
                          default=None, type=str)
      parser.add_argument('--imdb', dest='imdb_name',
                          help='dataset to train on',
                          default='voc_2007_trainval', type=str)
      parser.add_argument('--set', dest='set_cfgs',
                          help='set config keys', default=None,
                          nargs=argparse.REMAINDER)
  
      if len(sys.argv) == 1:
          parser.print_help()
          sys.exit(1)
  
      args = parser.parse_args()
      return args
function_tokens: def parse_args ( ) : parser = argparse . ArgumentParser ( description = 'Train a Faster R-CNN network' ) parser . add_argument ( '--gpu' , dest = 'gpu_id' , help = 'GPU device id to use [0]' , default = 0 , type = int ) parser . add_argument ( '--net_name' , dest = 'net_name' , help = 'network name (e.g., "ZF")' , default = None , type = str ) parser . add_argument ( '--weights' , dest = 'pretrained_model' , help = 'initialize with pretrained model weights' , default = None , type = str ) parser . add_argument ( '--cfg' , dest = 'cfg_file' , help = 'optional config file' , default = None , type = str ) parser . add_argument ( '--imdb' , dest = 'imdb_name' , help = 'dataset to train on' , default = 'voc_2007_trainval' , type = str ) parser . add_argument ( '--set' , dest = 'set_cfgs' , help = 'set config keys' , default = None , nargs = argparse . REMAINDER ) if len ( sys . argv ) == 1 : parser . print_help ( ) sys . exit ( 1 ) args = parser . parse_args ( ) return args