BA Training Config Explanation
- The name of the model. This will be used for folder names and will be appended to the model output.
- Whether or not to use tenserboardx (fancy graphs)
model: 'srragan' # srragan | sr | srgan
- The type of model. ESRGAN uses srragan
- The scale of your model. 4 = 4x = 4 times the size of the original image
- how much to multiple the batch size by to create a fake larger batch. Setting this higher slows down training but should help stabilize it, especially if you have a really low batch size.
- The ID of the GPU you want to use. For most people (with 1 GPU), this is 0
use_amp: false # set to true if you have a Volta/Turing GPU or better.
- Use Pytorch's Automatic Mixed Precision training (will speed up training, even if not on Volta/Turing)
- the name your train dataset will output in the CLI. Useless configuration.
- LRHR or LRHROTF. The OTF part is for On-The-Fly training. You can just leave it on LRHROTF as it doesn't change anything if you have the other settings off.
- Single directory path to your HR dataset files
- Single directory path to your LR dataset files
- Multi-directory path to your HR dataset files
- Multi-directory path to your LR dataset files
- No clue what this does lol
- Shuffles your dataset when training so it looks at the images in a random order
n_workers: 4 # 0 to disable CPU multithreading, or an integrer representing CPU threads to use for dataloading
- Number of CPU threads to use
- How many images will be loaded and looked at each iteration
HR_size: 128 # patch size. Default: 128
- The size it will crop out of your images and look at each iteration
lr_downscale: true # false
- Set this to true to downscale your HRs into your LRs, if you don't have any LRs. Set to false if you have actual LRs
lr_downscale_types: ['area', 'matlab_bicubic'] # select from: ['nearest', 'linear', 'cubic', 'area', 'lanczos4', 'linear_exact', 'matlab_bicubic'] # scale_algos #scaling interpolation options
- The scaling options for your generated LRs
hr_downscale: false # true | false
- You can also downscale your HRs if you wish for them to be smaller
hr_downscale_types: ['area', 'matlab_bicubic'] # select from: ['nearest', 'linear', 'cubic', 'area', 'lanczos4', 'linear_exact', 'matlab_bicubic'] # scale_algos #scaling interpolation options hr_downscale_amount: [1, 2, 4] # Random downscale factors for HR
- Set this to the root of your BasicSR directory
- The model that your model will use as a sort of base to get started with. The ones included with BasicSR originally are RRDB_ESRGAN_x4.pth or RRDB_PSNR_x4.pth, but you can use any old-arch model.
- The state to resume from. You can set this to be your training_state folder and it will select the most recent one. Comment this out if starting a new model
lr_G: 1e-4 # 2e-4 # starting lr_G #Test, default: 1e-4
- GAN learning rate
lr_D: 1e-4 # 4e-4 # starting lr_D #Test, default: 1e-4
- Discriminator learning rate
- Use the technique applied here: http://people.ee.ethz.ch/~timofter/publications/Fritsche-ICCVW-2019.pdf
lr_scheme: 'MultiStepLR' lr_steps: [50000, 100000, 200000, 300000] # training from scratch
- At each of these iterations, the learning rate will drop by the lr_gamma
lr_gamma: 0.5 # lr change at every step (multiplied by)
- Randomness seed
- Total number of iterations to train for
val_freq: 1000 # 5e3
- How many iterations will it take to validate the validation set
- How many iterations will it take to print to the console again
- How many iterations will it take to save a new model checkpoint
- How many iterations will it take to save a model backup