Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hvt #146

Merged
merged 13 commits into from
Dec 28, 2021
2 changes: 2 additions & 0 deletions image_classification/BEiT/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
1 change: 1 addition & 0 deletions image_classification/BEiT/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
1 change: 1 addition & 0 deletions image_classification/BEiT/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/BoTNet/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
7 changes: 4 additions & 3 deletions image_classification/BoTNet/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down Expand Up @@ -361,11 +362,11 @@ def main_worker(*args):
# set lr according to batch size and world size (hacked from Swin official code and modified for CSwin)
if config.TRAIN.LINEAR_SCALED_LR is not None:
linear_scaled_lr = (
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_warmup_start_lr = (
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_end_lr = (
config.TRAIN.END_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.END_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR

if config.TRAIN.ACCUM_ITER > 1:
linear_scaled_lr = linear_scaled_lr * config.TRAIN.ACCUM_ITER
Expand Down
1 change: 1 addition & 0 deletions image_classification/BoTNet/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/CSwin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
7 changes: 4 additions & 3 deletions image_classification/CSwin/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down Expand Up @@ -368,9 +369,9 @@ def main_worker(*args):

# STEP 5: Define optimizer and lr_scheduler
# set lr according to batch size and world size (hacked from Swin official code and modified for CSwin)
linear_scaled_lr = (config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE) / 256.0
linear_scaled_warmup_start_lr = (config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE) / 256.0
linear_scaled_end_lr = (config.TRAIN.END_LR * config.DATA.BATCH_SIZE) / 256.0
linear_scaled_lr = (config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE * world_size) / 256.0
linear_scaled_warmup_start_lr = (config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE * world_size) / 256.0
linear_scaled_end_lr = (config.TRAIN.END_LR * config.DATA.BATCH_SIZE * world_size) / 256.0

if config.TRAIN.ACCUM_ITER > 1:
linear_scaled_lr = linear_scaled_lr * config.TRAIN.ACCUM_ITER
Expand Down
1 change: 1 addition & 0 deletions image_classification/CSwin/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/CaiT/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
1 change: 1 addition & 0 deletions image_classification/CaiT/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
1 change: 1 addition & 0 deletions image_classification/CaiT/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/ConvMLP/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
7 changes: 4 additions & 3 deletions image_classification/ConvMLP/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down Expand Up @@ -369,11 +370,11 @@ def main_worker(*args):
# set lr according to batch size and world size (hacked from Swin official code and modified for CSwin)
if config.TRAIN.LINEAR_SCALED_LR is not None:
linear_scaled_lr = (
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_warmup_start_lr = (
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_end_lr = (
config.TRAIN.END_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.END_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR

if config.TRAIN.ACCUM_ITER > 1:
linear_scaled_lr = linear_scaled_lr * config.TRAIN.ACCUM_ITER
Expand Down
1 change: 1 addition & 0 deletions image_classification/ConvMLP/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/ConvMixer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
7 changes: 4 additions & 3 deletions image_classification/ConvMixer/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down Expand Up @@ -360,11 +361,11 @@ def main_worker(*args):
# set lr according to batch size and world size (hacked from Swin official code and modified for CSwin)
if config.TRAIN.LINEAR_SCALED_LR is not None:
linear_scaled_lr = (
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_warmup_start_lr = (
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_end_lr = (
config.TRAIN.END_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.END_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR

if config.TRAIN.ACCUM_ITER > 1:
linear_scaled_lr = linear_scaled_lr * config.TRAIN.ACCUM_ITER
Expand Down
1 change: 1 addition & 0 deletions image_classification/ConvMixer/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/CrossViT/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
1 change: 1 addition & 0 deletions image_classification/CrossViT/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
1 change: 1 addition & 0 deletions image_classification/CrossViT/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/Cvt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
7 changes: 4 additions & 3 deletions image_classification/Cvt/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down Expand Up @@ -355,11 +356,11 @@ def main_worker(*args):
# set lr according to batch size and world size (hacked from Swin official code and modified for CSwin)
if config.TRAIN.LINEAR_SCALED_LR is not None:
linear_scaled_lr = (
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_warmup_start_lr = (
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_end_lr = (
config.TRAIN.END_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.END_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR

if config.TRAIN.ACCUM_ITER > 1:
linear_scaled_lr = linear_scaled_lr * config.TRAIN.ACCUM_ITER
Expand Down
1 change: 1 addition & 0 deletions image_classification/Cvt/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/CycleMLP/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
1 change: 1 addition & 0 deletions image_classification/CycleMLP/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
1 change: 1 addition & 0 deletions image_classification/CycleMLP/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/DeiT/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
1 change: 1 addition & 0 deletions image_classification/DeiT/main_eval_regnet_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
7 changes: 4 additions & 3 deletions image_classification/DeiT/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down Expand Up @@ -395,11 +396,11 @@ def main_worker(*args):
# set lr according to batch size and world size (hacked from Swin official code and modified for CSwin)
if config.TRAIN.LINEAR_SCALED_LR is not None:
linear_scaled_lr = (
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.BASE_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_warmup_start_lr = (
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.WARMUP_START_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR
linear_scaled_end_lr = (
config.TRAIN.END_LR * config.DATA.BATCH_SIZE) / config.TRAIN.LINEAR_SCALED_LR
config.TRAIN.END_LR * config.DATA.BATCH_SIZE * world_size) / config.TRAIN.LINEAR_SCALED_LR

if config.TRAIN.ACCUM_ITER > 1:
linear_scaled_lr = linear_scaled_lr * config.TRAIN.ACCUM_ITER
Expand Down
1 change: 1 addition & 0 deletions image_classification/DeiT/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
2 changes: 2 additions & 0 deletions image_classification/FF_Only/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def update_config(config, args):
config.DATA.IMAGE_SIZE = args.image_size
if args.data_path:
config.DATA.DATA_PATH = args.data_path
if args.output is not None:
config.SAVE = args.output
if args.ngpus:
config.NGPUS = args.ngpus
if args.eval:
Expand Down
1 change: 1 addition & 0 deletions image_classification/FF_Only/main_multi_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
1 change: 1 addition & 0 deletions image_classification/FF_Only/main_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_arguments():
parser.add_argument('-batch_size', type=int, default=None)
parser.add_argument('-image_size', type=int, default=None)
parser.add_argument('-data_path', type=str, default=None)
parser.add_argument('-output', type=str, default=None)
parser.add_argument('-ngpus', type=int, default=None)
parser.add_argument('-pretrained', type=str, default=None)
parser.add_argument('-resume', type=str, default=None)
Expand Down
Loading