TIP_2022_CMFSL
TIP_2022_CMFSL copied to clipboard
Problem Solved
I train with only KSC dataset. After making the ocbs pickle. This error arises.
Data is OK.
ok
train labels: tensor([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4,
4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8])
size of train datas: torch.Size([45, 103, 9, 9])
dict_keys(['data', 'Labels', 'set'])
(9, 9, 103, 1800)
[0 0 0 ... 8 8 8]
(1800, 103, 9, 9)
target data augmentation label: [0 0 0 ... 8 8 8]
dict_keys([0, 1, 2, 3, 4, 5, 6, 7, 8])
(9, 9, 103, 1800)
[0 0 0 ... 8 8 8]
{'Total': 614006, 'Trainable': 614006}
Training...
Traceback (most recent call last):
File "/mnt/sde/niuyuanzhuo/TIP_2022_CMFSL-main/CMFSL_UP_main.py", line 480, in
After I change self.conv4 = conv3x3(528, FEATURE_DIM) to self.conv4 = conv3x3(928, FEATURE_DIM) , training process is fine. However, testing process has the same issue, when testing on piavaU dataset.
I seem to know the reason. the band number between test dataset and train dataset is different