Skip to content

Commit

Permalink
minor modify
Browse files Browse the repository at this point in the history
  • Loading branch information
OceanPang committed Oct 1, 2018
1 parent 070c1ea commit c20c2c8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def main():
build_dataloader(train_dataset, cfg.data.imgs_per_gpu,
cfg.data.workers_per_gpu, cfg.gpus, dist)
]
if args.validate:
val_dataset = obj_from_dict(cfg.data.test, datasets)
data_loaders.append(
build_dataloader(val_dataset, cfg.data.imgs_per_gpu,
cfg.data.workers_per_gpu, cfg.gpus, dist))

# build model
model = build_detector(
Expand All @@ -131,10 +136,9 @@ def main():

if args.validate:
val_dataset = obj_from_dict(cfg.data.test, datasets)
runner.register_hook(CocoDistEvalmAPHook(val_dataset))
# data_loaders.append(
# build_dataloader(val_dataset, cfg.data.imgs_per_gpu,
# cfg.data.workers_per_gpu, cfg.gpus, dist))
data_loaders.append(
build_dataloader(val_dataset, cfg.data.imgs_per_gpu,
cfg.data.workers_per_gpu, cfg.gpus, dist))

# register hooks
optimizer_config = DistOptimizerHook(
Expand Down

0 comments on commit c20c2c8

Please sign in to comment.