train_swinir.yaml 1.38 KB
Newer Older
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
1
2
3
4
data:
  target: dataset.data_module.BIRDataModule
  params:
    # Path to training set configuration file.
mashun1's avatar
diffbir  
mashun1 committed
5
    train_config: configs/dataset/general_deg_realesrgan_train.yaml
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
6
    # Path to validation set configuration file.
mashun1's avatar
diffbir  
mashun1 committed
7
    val_config: configs/dataset/general_deg_realesrgan_val.yaml
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21

model:
  # You can set learning rate in the following configuration file.
  config: configs/model/swinir.yaml
  # Path to the checkpoints or weights you want to resume.
  resume: ~

lightning:
  seed: 231
  
  trainer:
    accelerator: ddp
    precision: 32
    # Indices of GPUs used for training.
mashun1's avatar
diffbir  
mashun1 committed
22
    gpus: [5,7]
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
23
    # Path to save logs and checkpoints.
mashun1's avatar
diffbir  
mashun1 committed
24
    default_root_dir: stage1_checkpoints
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
25
    # Max number of training steps (batches).
mashun1's avatar
diffbir  
mashun1 committed
26
    max_steps: 10000
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
27
    # Validation frequency in terms of training steps.
mashun1's avatar
diffbir  
mashun1 committed
28
    val_check_interval: 0.25
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
29
    # Log frequency of tensorboard logger.
mashun1's avatar
diffbir  
mashun1 committed
30
    log_every_n_steps: 100
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
31
    # Accumulate gradients from multiple batches so as to increase batch size.
mashun1's avatar
diffbir  
mashun1 committed
32
    accumulate_grad_batches: 2
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
33
34
35
36
37
38
  
  callbacks:
    - target: model.callbacks.ImageLogger
      params:
        # Log frequency of image logger.
        log_every_n_steps: 1000
mashun1's avatar
diffbir  
mashun1 committed
39
        max_images_each_step: 2
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
40
41
42
43
44
        log_images_kwargs: ~

    - target: model.callbacks.ModelCheckpoint
      params:
        # Frequency of saving checkpoints.
mashun1's avatar
diffbir  
mashun1 committed
45
        every_n_train_steps: 1000
0x3f3f3f3fun's avatar
0x3f3f3f3fun committed
46
47
        save_top_k: -1
        filename: "{step}"