Unable to train the model
Closed this issue · 2 comments
Hi Kris,
I downloaded the dataset from HKH Glacier Mapping to try to train the model. If I understand correctly, I can call train.py under the scripts folder to train the downloaded data. However, I encountered the following problems:
Given groups=1, weight of size [16, 11, 3, 3], expected input[16, 15, 512, 512] to have 11 channels, but got 15 channels instead
I tried to go back and look directly at the image in the npy file and found their dimensions are in [512,512,15]. From my understanding, I might forget the normalisation process. But I am not very clear about this part, can you please elaborate, especially about the stats_train.json file in postprocess.yaml.
Best wishes,
Oliver
Hello Oliver,
The configuration for U-Net based model is specified in the file glacier_mapping/conf/train.yaml
Given that the downloaded images have 15 channels, I would suggest you change inchannels: 11 on line 4 to inchannels: 15. The given configuration file is expecting input image to have just 11 channels instead of the downloaded 15.
The stats_train.json file contains the mean and standard deviation across all channels and is calculated using generate_stats function in glacier_mapping/data/process_slices_funs.py. These pre-calculated stats are later used to normalize the training samples during training.
Please let me know if you are still experiencing the issue.
Regards,
Bibek
Hi Bibek,
Thank you for your explanations.
Oliver