Training Arguments
Learn about the available training arguments in the PyTorch Image Model.
There are over 100 arguments available in the training script of the PyTorch Image Model.
These parameters can be organized into the following categories:
- Dataset
- Model
- Optimizer
- Learning rate
- Augmentation and regularization
- Batch normalization
- Model exponential moving average
- Miscellaneous
Dataset
The training script accepts the following arguments that are related to the datasets:
data_dir
: This is the path to datasets.dataset
: This is the dataset type. If it’s not specified, it defaults to ImageFolder/ImageTar.train-split
: This specifies whether to split the datasets into train segments.val-split
: This specifies whether to split the datasets into validation segments.dataset-download
: This allows us to download datasets for supported torch and TFDS datasets.class-map
: This is theclass-to-idx
mapping file path.
Model
We can specify the following arguments to configure our model:
model
: This is the name of the model to train (default isresnet50
).pretrained
: This specifies whether to start with a pretrained version of the specified network if available.initial-checkpoint
: We use this checkpoint to initialize the model.resume
: This specifies whether to resume the full model and optimizer state from a checkpoint.no-resume-opt
: This prevents the resumption of the optimizer state when resuming model.num-classes
: This is the total number of label classes.gp
: This is the type of global pool. It acceptsfast
,avg
,max
,avgmax
, oravgmaxc
.img-size
: This is the patch size of the image.input-size
: This is the dimensions of the input image (D H W). For example, we can use--input-size 3 224 224
for input of 224 x