mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
[Fix] Fix preprocess_model_config for CIFAR dataset (#1659)
* fix cifar10 for mmcls * remove unnecessary code
This commit is contained in:
parent
15ad234a7a
commit
cbddf5a458
@ -63,8 +63,10 @@ def process_model_config(model_cfg: Config,
|
|||||||
cfg.test_pipeline.pop(0)
|
cfg.test_pipeline.pop(0)
|
||||||
# check whether input_shape is valid
|
# check whether input_shape is valid
|
||||||
if input_shape is not None:
|
if input_shape is not None:
|
||||||
if 'crop_size' in cfg.test_pipeline[2]:
|
for pipeline_component in cfg.test_pipeline:
|
||||||
crop_size = cfg.test_pipeline[2]['crop_size']
|
if 'Crop' in pipeline_component['type']:
|
||||||
|
if 'crop_size' in pipeline_component:
|
||||||
|
crop_size = pipeline_component['crop_size']
|
||||||
if tuple(input_shape) != (crop_size, crop_size):
|
if tuple(input_shape) != (crop_size, crop_size):
|
||||||
logger = get_root_logger()
|
logger = get_root_logger()
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user