From 753ec6847b9921c1318797838e1ec11d5afd88c4 Mon Sep 17 00:00:00 2001 From: Jeremy Fix Date: Thu, 14 Mar 2019 15:05:52 +0100 Subject: [PATCH 1/5] forwarding key:value arguments to the data_loader --- train.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index eeabc578..0c4040bf 100644 --- a/train.py +++ b/train.py @@ -38,6 +38,15 @@ def train(cfg, writer, logger): data_aug = get_composed_augmentations(augmentations) # Setup Dataloader + dataloader_args = cfg["data"].copy() + dataloader_args.pop('dataset') + dataloader_args.pop('train_split') + dataloader_args.pop('val_split') + dataloader_args.pop('img_rows') + dataloader_args.pop('img_cols') + dataloader_args.pop('path') + + data_loader = get_loader(cfg["data"]["dataset"]) data_path = cfg["data"]["path"] @@ -47,6 +56,7 @@ def train(cfg, writer, logger): split=cfg["data"]["train_split"], img_size=(cfg["data"]["img_rows"], cfg["data"]["img_cols"]), augmentations=data_aug, + **dataloader_args ) v_loader = data_loader( @@ -54,6 +64,7 @@ def train(cfg, writer, logger): is_transform=True, split=cfg["data"]["val_split"], img_size=(cfg["data"]["img_rows"], cfg["data"]["img_cols"]), + **dataloader_args ) n_classes = t_loader.n_classes @@ -61,7 +72,7 @@ def train(cfg, writer, logger): t_loader, batch_size=cfg["training"]["batch_size"], num_workers=cfg["training"]["n_workers"], - shuffle=True, + shuffle=True ) valloader = data.DataLoader( From ed3cae65dfbd6acbedf16ec5ec4e308f99d9f41b Mon Sep 17 00:00:00 2001 From: Jeremy Fix Date: Thu, 14 Mar 2019 15:16:45 +0100 Subject: [PATCH 2/5] upd the path to my local dirs --- configs/fcn8s_pascal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/fcn8s_pascal.yml b/configs/fcn8s_pascal.yml index ee412389..2cfa0fed 100644 --- a/configs/fcn8s_pascal.yml +++ b/configs/fcn8s_pascal.yml @@ -6,8 +6,8 @@ data: val_split: val img_rows: 'same' img_cols: 'same' - path: /private/home/meetshah/datasets/VOC/060817/VOCdevkit/VOC2012/ - sbd_path: /private/home/meetshah/datasets/VOC/benchmark_RELEASE/ + path: /opt/fix/Datasets/VOCdevkit/VOC2012/ + sbd_path: /opt/fix/Datasets/benchmark_RELEASE/ training: train_iters: 300000 batch_size: 1 From b09daf50db82bb1c901e84848d180596b3a98e8c Mon Sep 17 00:00:00 2001 From: Jeremy Fix Date: Thu, 14 Mar 2019 15:45:51 +0100 Subject: [PATCH 3/5] Revert "forwarding key:value arguments to the data_loader" This reverts commit 753ec6847b9921c1318797838e1ec11d5afd88c4. --- train.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/train.py b/train.py index 0c4040bf..eeabc578 100644 --- a/train.py +++ b/train.py @@ -38,15 +38,6 @@ def train(cfg, writer, logger): data_aug = get_composed_augmentations(augmentations) # Setup Dataloader - dataloader_args = cfg["data"].copy() - dataloader_args.pop('dataset') - dataloader_args.pop('train_split') - dataloader_args.pop('val_split') - dataloader_args.pop('img_rows') - dataloader_args.pop('img_cols') - dataloader_args.pop('path') - - data_loader = get_loader(cfg["data"]["dataset"]) data_path = cfg["data"]["path"] @@ -56,7 +47,6 @@ def train(cfg, writer, logger): split=cfg["data"]["train_split"], img_size=(cfg["data"]["img_rows"], cfg["data"]["img_cols"]), augmentations=data_aug, - **dataloader_args ) v_loader = data_loader( @@ -64,7 +54,6 @@ def train(cfg, writer, logger): is_transform=True, split=cfg["data"]["val_split"], img_size=(cfg["data"]["img_rows"], cfg["data"]["img_cols"]), - **dataloader_args ) n_classes = t_loader.n_classes @@ -72,7 +61,7 @@ def train(cfg, writer, logger): t_loader, batch_size=cfg["training"]["batch_size"], num_workers=cfg["training"]["n_workers"], - shuffle=True + shuffle=True, ) valloader = data.DataLoader( From 3eee0eeb73ae3762a45285268021e25b3f14a7c1 Mon Sep 17 00:00:00 2001 From: Jeremy Fix Date: Thu, 14 Mar 2019 15:47:14 +0100 Subject: [PATCH 4/5] Revert "upd the path to my local dirs" This reverts commit ed3cae65dfbd6acbedf16ec5ec4e308f99d9f41b. --- configs/fcn8s_pascal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/fcn8s_pascal.yml b/configs/fcn8s_pascal.yml index 2cfa0fed..ee412389 100644 --- a/configs/fcn8s_pascal.yml +++ b/configs/fcn8s_pascal.yml @@ -6,8 +6,8 @@ data: val_split: val img_rows: 'same' img_cols: 'same' - path: /opt/fix/Datasets/VOCdevkit/VOC2012/ - sbd_path: /opt/fix/Datasets/benchmark_RELEASE/ + path: /private/home/meetshah/datasets/VOC/060817/VOCdevkit/VOC2012/ + sbd_path: /private/home/meetshah/datasets/VOC/benchmark_RELEASE/ training: train_iters: 300000 batch_size: 1 From 5235e8fca6a564592f67c67c01102cec2ad5f942 Mon Sep 17 00:00:00 2001 From: Jeremy Fix Date: Thu, 14 Mar 2019 15:53:39 +0100 Subject: [PATCH 5/5] ...hard time to revert a commit ... --- train.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index eeabc578..2723a5bd 100644 --- a/train.py +++ b/train.py @@ -38,6 +38,14 @@ def train(cfg, writer, logger): data_aug = get_composed_augmentations(augmentations) # Setup Dataloader + dataloader_args = cfg["data"].copy() + dataloader_args.pop('dataset') + dataloader_args.pop('train_split') + dataloader_args.pop('val_split') + dataloader_args.pop('img_rows') + dataloader_args.pop('img_cols') + dataloader_args.pop('path') + data_loader = get_loader(cfg["data"]["dataset"]) data_path = cfg["data"]["path"] @@ -47,6 +55,7 @@ def train(cfg, writer, logger): split=cfg["data"]["train_split"], img_size=(cfg["data"]["img_rows"], cfg["data"]["img_cols"]), augmentations=data_aug, + **dataloader_args ) v_loader = data_loader( @@ -54,6 +63,7 @@ def train(cfg, writer, logger): is_transform=True, split=cfg["data"]["val_split"], img_size=(cfg["data"]["img_rows"], cfg["data"]["img_cols"]), + **dataloader_args ) n_classes = t_loader.n_classes @@ -61,7 +71,7 @@ def train(cfg, writer, logger): t_loader, batch_size=cfg["training"]["batch_size"], num_workers=cfg["training"]["n_workers"], - shuffle=True, + shuffle=True ) valloader = data.DataLoader(