support test_crop_size in data config resolve

pull/1327/head
Ross Wightman 2 years ago
parent 6064d16a2d
commit 70d6d2c484

@ -64,11 +64,15 @@ def resolve_data_config(args, default_cfg={}, model=None, use_test_size=False, v
new_config['std'] = default_cfg['std'] new_config['std'] = default_cfg['std']
# resolve default crop percentage # resolve default crop percentage
new_config['crop_pct'] = DEFAULT_CROP_PCT crop_pct = DEFAULT_CROP_PCT
if 'crop_pct' in args and args['crop_pct'] is not None: if 'crop_pct' in args and args['crop_pct'] is not None:
new_config['crop_pct'] = args['crop_pct'] crop_pct = args['crop_pct']
elif 'crop_pct' in default_cfg: else:
new_config['crop_pct'] = default_cfg['crop_pct'] if use_test_size and 'test_crop_pct' in default_cfg:
crop_pct = default_cfg['test_crop_pct']
elif 'crop_pct' in default_cfg:
crop_pct = default_cfg['crop_pct']
new_config['crop_pct'] = crop_pct
if verbose: if verbose:
_logger.info('Data processing configuration for current model + dataset:') _logger.info('Data processing configuration for current model + dataset:')

Loading…
Cancel
Save