From c8d1a3530d866c6f7972eb5b7c24af898c632af7 Mon Sep 17 00:00:00 2001 From: CHENGY12 <747389382@qq.com> Date: Tue, 24 Jan 2023 17:16:55 +0400 Subject: [PATCH] update --- plot-coop/README.md | 1 - plot-coop/configs/trainers/PLOT/rn50.yaml | 2 +- plot-coop/train.py | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plot-coop/README.md b/plot-coop/README.md index a64604b7..85e232a9 100644 --- a/plot-coop/README.md +++ b/plot-coop/README.md @@ -15,7 +15,6 @@ Please follow the instructions [DATASETS.md](https://github.com/KaiyangZhou/CoOp The running scripts are in `scripts/`. `cd ./scripts` and change the `your_data_path` and `your_work_path` in `scripts/main.sh` - Then, you can run the commands `bash main.sh DATASET N` under `CoOp/scripts/`. `DATASET` takes as input a dataset name, like `caltech101`. diff --git a/plot-coop/configs/trainers/PLOT/rn50.yaml b/plot-coop/configs/trainers/PLOT/rn50.yaml index 3ddd5f1e..c6699761 100644 --- a/plot-coop/configs/trainers/PLOT/rn50.yaml +++ b/plot-coop/configs/trainers/PLOT/rn50.yaml @@ -1,6 +1,6 @@ DATALOADER: TRAIN_X: - BATCH_SIZE: 128 #32 for small dataset such as FGVC_air + BATCH_SIZE: 128 TEST: BATCH_SIZE: 200 NUM_WORKERS: 8 diff --git a/plot-coop/train.py b/plot-coop/train.py index d09cc721..83f129aa 100644 --- a/plot-coop/train.py +++ b/plot-coop/train.py @@ -124,6 +124,9 @@ def setup_cfg(args): if cfg.DATASET.NAME== "ImageNet": cfg.OPTIM.MAX_EPOCH=50 + if cfg.DATASET.NAME in ['OxfordFlowers','FGVCAircraft','StanfordCars']: + cfg.DATALOADER.TRAIN_X.BATCH_SIZE=32 #32 for small dataset such as Car,Air,Flowers + cfg.freeze()