Closed JZhu1208 closed 4 months ago
The configs in option.yml
's network_g should match the network's args. For example, if the unet is initialized by using 'UNet(img_ch)', you should remove the 'img_size' and 'output_ch' in yml.
okay, thank you for your help.
Have you successfully trained the network? I would like to inquire about the specific settings.
Hello, when I wanted to use U_Net for training, I modified the following parameters: In 'uformer_flare7kpp_baseline_option', change the parameter 'type' of 'network_g' to 'U_Net' for training. The error reported is:
Traceback (most recent call last): File "basicsr/train.py", line 217, in
train_pipeline(root_path)
File "basicsr/train.py", line 126, in train_pipeline
model = build_model(opt)
File ".../basicsr/models/init.py", line 26, in build_model
model = MODEL_REGISTRY.get(opt['model_type'])(opt)
File ".../basicsr/models/sr_model.py", line 22, in init
self.net_g = build_network(opt['network_g'])
File ".../basicsr/archs/init.py", line 25, in build_network
net = ARCH_REGISTRY.get(network_type)(**opt)
TypeError: init() got an unexpected keyword argument 'img_size'
How to solve this problem? If I want to use U_Net to train the network, are there any more steps required? I am looking forward to your reply.