fix: cli argument choices
Browse files
train.py
CHANGED
@@ -57,7 +57,7 @@ parser.add_argument(
|
|
57 |
"--augmentation",
|
58 |
type=str,
|
59 |
default=None,
|
60 |
-
choices=["v1", "v2"],
|
61 |
help="Augmentation strategy to use (default: None)",
|
62 |
)
|
63 |
parser.add_argument(
|
@@ -105,7 +105,7 @@ parser.add_argument(
|
|
105 |
)
|
106 |
parser.add_argument(
|
107 |
"-r",
|
108 |
-
"--preserve-aspect-ratio",
|
109 |
action="store_true",
|
110 |
help="Preserve aspect ratio (default: False)",
|
111 |
)
|
@@ -155,7 +155,7 @@ data_module = FontDataModule(
|
|
155 |
regression_use_tanh=regression_use_tanh,
|
156 |
train_transforms=args.augmentation,
|
157 |
crop_roi_bbox=args.crop_roi_bbox,
|
158 |
-
preserve_aspect_ratio_by_random_crop=args.
|
159 |
)
|
160 |
|
161 |
num_iters = data_module.get_train_num_iter(num_device) * num_epochs
|
|
|
57 |
"--augmentation",
|
58 |
type=str,
|
59 |
default=None,
|
60 |
+
choices=["v1", "v2", "v3"],
|
61 |
help="Augmentation strategy to use (default: None)",
|
62 |
)
|
63 |
parser.add_argument(
|
|
|
105 |
)
|
106 |
parser.add_argument(
|
107 |
"-r",
|
108 |
+
"--preserve-aspect-ratio-by-random-crop",
|
109 |
action="store_true",
|
110 |
help="Preserve aspect ratio (default: False)",
|
111 |
)
|
|
|
155 |
regression_use_tanh=regression_use_tanh,
|
156 |
train_transforms=args.augmentation,
|
157 |
crop_roi_bbox=args.crop_roi_bbox,
|
158 |
+
preserve_aspect_ratio_by_random_crop=args.preserve_aspect_ratio_by_random_crop,
|
159 |
)
|
160 |
|
161 |
num_iters = data_module.get_train_num_iter(num_device) * num_epochs
|