| 176 | |
| 177 | |
| 178 | def parse_args(): |
| 179 | description = ('Parse a Caffe training log into two CSV files ' |
| 180 | 'containing training and testing information') |
| 181 | parser = argparse.ArgumentParser(description=description) |
| 182 | |
| 183 | parser.add_argument('logfile_path', |
| 184 | help='Path to log file') |
| 185 | |
| 186 | parser.add_argument('output_dir', |
| 187 | help='Directory in which to place output CSV files') |
| 188 | |
| 189 | parser.add_argument('--verbose', |
| 190 | action='store_true', |
| 191 | help='Print some extra info (e.g., output filenames)') |
| 192 | |
| 193 | parser.add_argument('--delimiter', |
| 194 | default=',', |
| 195 | help=('Column delimiter in output files ' |
| 196 | '(default: \'%(default)s\')')) |
| 197 | |
| 198 | args = parser.parse_args() |
| 199 | return args |
| 200 | |
| 201 | |
| 202 | def main(): |