Use shell script to run the code. For training a model, use script such as:
python main.py --name faishion_05_symmetric \
--dataset_name FashionMNIST0.5.npz --lr 0.0003 \
--input_nc 1 --loss_name ce --num_classes 3;
For testing a model, use script such as:
python main.py --name faishion_06_symmetric \
--dataset_name FashionMNIST0.6.npz --is_testing \
--input_nc 1 --loss_name ce --num_classes 3 \
--pretrained_model_path checkpoints/faishion_06_symmetric/faishion_06_symmetric_20_model.pth
The meanings of availble parameters are:
--name
name of the experiment. It decides where to store samples and models--dataset_name
the name of the dataset--dataset_root
the root folder of the dataset--checkpoints_dir
the root folder of checkpoints--input_nc
# of input image channels--nf
# of gen filters in first conv layer--num_classes
# of classes--is_testing
if it is testing phase--epoch
training epochs--batch_size
training batch size--loss_name
name of the loss function used to train the model bootstrap|ce|mpe|symmetric.--sigma
sigma value in the loss function.--lr
initial learning rate for adam--beta1
momentum term of adam--beta2
momentum term of adam--val_split_rate
the split rate of data for validating--optimizer
the optimizer method sgd|adam--print_loss
If loss should be printed during the training phase--save_model
If model need to be saved after training--num_trained_model
How many model do we need to train--trans_matrix
transition matrix if known--pretrained_model_path
the path of the pretrained model--pretrained_model_path_format
the path format of the pretrained model--log_file_path
the path of the log file