BasicSR
BasicSR copied to clipboard
Error training for x2
The size of tensor a (256) must match the size of tensor b (128) at non-singleton dimension 3
What do I need to change to fix this error?
Here is the log of my training on X2 model. You can find the configs in the beginning.
train_002_MSRResNetx2_MSRResNetx4Ini_DIV2K_190609-174010.log
Thank you! I read other comments that say I need to change something in the discriminator to avoid this error as well. Which file should I modify to change this?
Do you use the RRDB-Net ? If so, you need to comment two lines as said in #174 .
Yes I used RRDB-Net. I now get this error:
RuntimeError: Error(s) in loading state_dict for RRDBNet: untimeError: Error(s) in loading state_dict for RRDBNet: Unexpected key(s) in state_dict: "upconv2.weight", "upconv2.bias".
If you load the pre-trained X4 model, try to set strict_load: false
RuntimeError: Error(s) in loading state_dict for RRDBNet: untimeError: Error(s) in loading state_dict for RRDBNet: Unexpected key(s) in state_dict: "upconv2.weight", "upconv2.bias".
Did this solve your problem? If you did run it, could I know the steps please?Thanks!
@Alongstory
Did you want to train the X2 model?
If so, this should work - set strict_load: false
.
it worked for my case! @xinntao