When testing color images (Lytro dataset) using the multi-clustered image pretraining model, you cannot set in_channel=3 in test_swinfusion.py, only in_channel=1。The error message is :
RuntimeError: Error(s) in loading state_dict for SwinFusion:
size mismatch for conv_first1_A.weight: copying a param with shape torch.Size([30, 1, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 3, 3, 3]).
size mismatch for conv_first1_B.weight: copying a param with shape torch.Size([30, 1, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 3, 3, 3]).
size mismatch for conv_last3.weight: copying a param with shape torch.Size([1, 15, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 15, 3, 3]).
size mismatch for conv_last3.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([3]).
So may I ask whether the pre-training model provided can be used to fuse color images
When testing color images (Lytro dataset) using the multi-clustered image pretraining model, you cannot set in_channel=3 in test_swinfusion.py, only in_channel=1。The error message is :
RuntimeError: Error(s) in loading state_dict for SwinFusion: size mismatch for conv_first1_A.weight: copying a param with shape torch.Size([30, 1, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 3, 3, 3]). size mismatch for conv_first1_B.weight: copying a param with shape torch.Size([30, 1, 3, 3]) from checkpoint, the shape in current model is torch.Size([30, 3, 3, 3]). size mismatch for conv_last3.weight: copying a param with shape torch.Size([1, 15, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 15, 3, 3]). size mismatch for conv_last3.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([3]).
So may I ask whether the pre-training model provided can be used to fuse color images