Added epoch parameter for training and checkpoints

This commit is contained in:
Emilio Martinez 2023-03-26 12:21:06 -03:00
parent 27b366e8e9
commit a356f038a8
2 changed files with 11 additions and 9 deletions

View File

@ -159,7 +159,7 @@ def main(json_path='options/train_drunet.json'):
# ----------------------------------------
'''
for epoch in range(1000000): # keep running
for epoch in range(opt['train']['epochs']): # keep running
if opt['dist']:
train_sampler.set_epoch(epoch)

View File

@ -1,7 +1,7 @@
{
"task": "drunet" // root/task/images-models-options
, "model": "plain" // "plain"
, "gpu_ids": []
, "gpu_ids": [0]
, "scale": 1 // broadcast to "netG" if SISR
, "n_channels": 2 // broadcast to "datasets", 1 for grayscale, 3 for color
@ -18,7 +18,7 @@
"train": {
"name": "train_dataset" // just name
, "dataset_type": "ffdnet" // "dncnn" | "dnpatch" for dncnn, | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch"
, "dataroot_H": "trainsets/trainH"// path of H training dataset
, "dataroot_H": "trainsets/web_images_train"// path of H training dataset
, "dataroot_L": null // path of L training dataset
, "H_size": 128 // patch size 40 | 64 | 96 | 128 | 192
, "dataloader_shuffle": true
@ -28,7 +28,7 @@
, "test": {
"name": "test_dataset" // just name
, "dataset_type": "ffdnet" // "dncnn" | "dnpatch" for dncnn, | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch"
, "dataroot_H": "testsets/set12" // path of H testing dataset
, "dataroot_H": "testsets/web_images_test" // path of H testing dataset
, "dataroot_L": null // path of L testing dataset
}
}
@ -52,7 +52,8 @@
}
, "train": {
"G_lossfn_type": "l1" // "l1" preferred | "l2sum" | "l2" | "ssim"
"epochs": 15 // number of epochs to train
, "G_lossfn_type": "l1" // "l1" preferred | "l2sum" | "l2" | "ssim"
, "G_lossfn_weight": 1.0 // default
, "G_tvloss_weight": 1.0 // total variation weight
@ -66,9 +67,10 @@
, "G_regularizer_orthstep": null // unused
, "G_regularizer_clipstep": null // unused
, "checkpoint_test": 5000 // for testing
, "checkpoint_save": 5000 // for saving model
, "checkpoint_print": 200 // for print
// iteration (batch step) checkpoints
, "checkpoint_test": 60 // for testing
, "checkpoint_save": 60 // for saving model
, "checkpoint_print": 20 // for print
}
}