LeiaLi / SRDiff

171 stars 19 forks source link

raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for RRDBNet: #10

Open Taonanana opened 1 year ago

Taonanana commented 1 year ago

训练df2k4x数据集的时候,训练完RRDB网络后,再训练diffsr时出现上面的问题,请问要怎么解决,也没改什么参数呀

ilk123 commented 1 year ago

Did you solve this problem, I have the same problem as you

ilk123 commented 1 year ago

I've solved this problem. you can find the 'config.yaml' in the checkpoints folder, and modified parameters 'rrdb_num_block' and 'rrdb_num_block' to 17 and 64, which is the same as the pretrained RRDB.

Ponhappy commented 1 year ago

I've solved this problem. you can find the 'config.yaml' in the checkpoints folder, and modified parameters 'rrdb_num_block' and 'rrdb_num_block' to 17 and 64, which is the same as the pretrained RRDB.

Sorry, I can't find the parameter 'rrdb_num_block' in the 'config.yaml', do you mean 'num_block'? I find 'num_block = 17' in the checkpoints of div2k.

Taonanana commented 1 year ago

I've solved this problem. you can find the 'config.yaml' in the checkpoints folder, and modified parameters 'rrdb_num_block' and 'rrdb_num_block' to 17 and 64, which is the same as the pretrained RRDB.

modified parameters 'rrdb_num_block' to 17,and which parameters modified to 64?

Ponhappy commented 1 year ago

Thank you. I've solved this problem. I found the 'diffsr_base.yaml' in the config folder and modified the parameters 'rrdb_num_block' to 17 and 'rrdb_num_feat' to 64, and then I can run the next step correctly.

Taonanana commented 1 year ago

I've solved this problem. you can find the 'config.yaml' in the checkpoints folder, and modified parameters 'rrdb_num_block' and 'rrdb_num_block' to 17 and 64, which is the same as the pretrained RRDB.

modified parameters 'rrdb_num_block' to 17,and which parameters modified to 64?

rrdb_num_feat' to 64 is ok