Add drop_last when building eval optimizer (#158)

* [Fix]: Add drop_last param when build evaluation dataloader

* [Fix]: Delete pdb

* [Fix]: Delete auto resume

* [Fix]: remove import find_available_ckpt

* [Fix]: Delete bracket
pull/161/head
Yuan Liu 2021-12-24 15:14:00 +08:00 committed by GitHub
parent 3237c76474
commit e96d81e76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,6 @@ def train_model(model,
else:
model = MMDataParallel(
model.cuda(cfg.gpu_ids[0]), device_ids=cfg.gpu_ids)
# build optimizer
optimizer = build_optimizer(model, cfg.optimizer)
@ -167,6 +166,7 @@ def train_model(model,
dist=distributed,
shuffle=False,
prefetch=cfg.data.val.prefetch,
drop_last=getattr(cfg.data, 'drop_last', False),
img_norm_cfg=cfg.get('img_norm_cfg', dict()))
eval_cfg = cfg.get('evaluation', {})
eval_cfg['by_epoch'] = cfg.runner['type'] != 'IterBasedRunner'