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 SVMs (old skool)')
      parser.add_argument('--gpu', dest='gpu_id', help='GPU device id to use [0]',
                          default=0, type=int)
      parser.add_argument('--def', dest='prototxt',
                          help='prototxt file defining the network',
                          default=None, type=str)
      parser.add_argument('--net', dest='caffemodel',
                          help='model to test',
                          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)
  
      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 SVMs (old skool)' ) parser . add_argument ( '--gpu' , dest = 'gpu_id' , help = 'GPU device id to use [0]' , default = 0 , type = int ) parser . add_argument ( '--def' , dest = 'prototxt' , help = 'prototxt file defining the network' , default = None , type = str ) parser . add_argument ( '--net' , dest = 'caffemodel' , help = 'model to test' , 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 ) if len ( sys . argv ) == 1 : parser . print_help ( ) sys . exit ( 1 ) args = parser . parse_args ( ) return args