(config, args)
| 169 | |
| 170 | |
| 171 | def update_config(config, args): |
| 172 | _update_config_from_file(config, args.cfg) |
| 173 | |
| 174 | config.defrost() |
| 175 | if args.opts: |
| 176 | config.merge_from_list(args.opts) |
| 177 | |
| 178 | # merge from specific arguments |
| 179 | if args.batch_size: |
| 180 | config.DATA.BATCH_SIZE = args.batch_size |
| 181 | if args.data_path: |
| 182 | config.DATA.DATA_PATH = args.data_path |
| 183 | if args.resume: |
| 184 | config.MODEL.RESUME = args.resume |
| 185 | if args.amp: |
| 186 | config.AMP = args.amp |
| 187 | if args.print_freq: |
| 188 | config.PRINT_FREQ = args.print_freq |
| 189 | if args.output: |
| 190 | config.OUTPUT = args.output |
| 191 | if args.tag: |
| 192 | config.TAG = args.tag |
| 193 | if args.eval: |
| 194 | config.EVAL_MODE = True |
| 195 | if args.throughput: |
| 196 | config.THROUGHPUT_MODE = True |
| 197 | |
| 198 | # output folder |
| 199 | config.OUTPUT = os.path.join(config.OUTPUT, config.MODEL.NAME, config.TAG) |
| 200 | |
| 201 | config.freeze() |
| 202 | |
| 203 | |
| 204 | def get_config(args): |
no test coverage detected