model = dict(
type='BasicRestorer', # Name of the model
generator=dict( # Config of the generator
type='EDSR', # Type of the generator
in_channels=3, # Channel number of inputs
out_channels=3, # Channel number of outputs
mid_channels=64, # Channel number of intermediate features
num_blocks=16, # Block number in the trunk network
upscale_factor=scale, # Upsampling factor
res_scale=1, # Used to scale the residual in residual block
rgb_mean=(0.4488, 0.4371, 0.4040), # Image mean in RGB orders
rgb_std=(1.0, 1.0, 1.0)), # Image std in RGB orders
pretrained=None,
pixel_loss=dict(type='L1Loss', loss_weight=1.0, reduction='mean')) # Config for pixel loss model training and testing settings
|
model = dict(
type='BaseEditModel', # Name of the model
generator=dict( # Config of the generator
type='EDSRNet', # Type of the generator
in_channels=3, # Channel number of inputs
out_channels=3, # Channel number of outputs
mid_channels=64, # Channel number of intermediate features
num_blocks=16, # Block number in the trunk network
upscale_factor=scale, # Upsampling factor
res_scale=1, # Used to scale the residual in residual block
rgb_mean=(0.4488, 0.4371, 0.4040), # Image mean in RGB orders
rgb_std=(1.0, 1.0, 1.0)), # Image std in RGB orders
pixel_loss=dict(type='L1Loss', loss_weight=1.0, reduction='mean') # Config for pixel loss
train_cfg=dict(), # Config of training model.
test_cfg=dict(), # Config of testing model.
data_preprocessor=dict( # The Config to build data preprocessor
type='DataPreprocessor', mean=[0., 0., 0.], std=[255., 255.,
255.]))
|