<|start_filename|>configs/resnet.json<|end_filename|>
{
  "name": "SRResNet",
  "upscale_factor": 4.0,
  "num_inputs": 3,
  "num_outputs": 3,
  "output_activation": "none",
  "num_res_blocks": 16,
  "relu_leakiness": 0.0,
  "weight_init": {
    "conv_weight": ["orthogonal", "relu"]
  },
  "padding": "reflection"
}


<|start_filename|>configs/srresnet.json<|end_filename|>
{
  "seed": 0,
  "run_name": "srresnet-scale_4",

  "train_dataset": "COCO",
  "validation_dataset": "BSDS500",
  "train_crop_size": 96,
  "test_crop_size": 96,
  "scale_to_orig": false,
  "upscale_factor": 4.0,
  "interpolation": "bicubic",

  "application": "super_resolution",
  "runner_type": "standard",

  "model": {
	"#include": "resnet.json"
  },

  "loss_name": "MSE",

  "optimizer": {
    "name": "Adam",
    "learning_rate": 0.0001
  },

  "num_epochs": 140,
  "batch_size": 16,
  "epochs_per_validation": 1,
  "epochs_per_checkpoint": 1,
  "steps_per_train_summary": 100,
  "num_periodic_checkpoints": 1,
  "num_data_workers": 8,

  "train_metrics": ["psnr"],
  "validation_metrics": ["psnr", "ssim"],
  "validation_checkpoint_metrics": ["loss_MSE"],

  "use_tensorboard": true,
  "num_image_summaries": 8
}


<|start_filename|>configs/srgan.json<|end_filename|>
{
  "seed": 0,
  "run_name": "srgan-scale_4",

  "train_dataset": "COCO",
  "validation_dataset": "BSDS500",
  "train_crop_size": 96,
  "test_crop_size": 96,
  "scale_to_orig": false,
  "upscale_factor": 4.0,
  "interpolation": "bicubic",

  "application": "super_resolution",
  "runner_type": "adversarial",

  "generator_model": {
    "#include": "resnet.json",
	"pretrained_weights": ["../resources/pretrained/srresnet.pth", "model"]
  },

  "discriminator_model": {
    "#include": "srgan_discriminator.json",
    "spatial_shape": [96, 96]
  },

  "generator_adversarial_losses": ["gan"],
  "generator_losses": ["VGG19"],
  "generator_loss_weights": {
	  "gan": 0.001,
	  "VGG19": 0.28
  },
  "discriminator_losses": ["gan"],

  "generator_optimizer": {
    "name": "Adam",
    "learning_rate": 0.0001,
    "lr_scheduler": "multistep",
    "decay_steps": [13],
    "decay_factor": 0.1
  },

  "discriminator_optimizer": {
    "name": "Adam",
    "learning_rate": 0.0001,
    "lr_scheduler": "multistep",
    "decay_steps": [13],
    "decay_factor": 0.1
  },

  "num_epochs": 28,
  "batch_size": 16,
  "epochs_per_validation": 1,
  "epochs_per_checkpoint": 1,
  "steps_per_train_summary": 100,
  "num_periodic_checkpoints": 3,
  "num_data_workers": 8,

  "train_generator_metrics": ["psnr"],
  "train_discriminator_metrics": ["binary_accuracy"],
  "validation_metrics": ["psnr", "ssim"],

  "use_tensorboard": true,
  "num_image_summaries": 8
}
