Hello all, I am using a simple UNET model which I adapted from here. The model works well with the Pytorch dataset class of the author.
However, when I try to use this model on a new Pytorch dataset (which I created), it returns nan training loss and nan validation losses. I am using nn.CrossEntropyLoss(). I believe my Pytorch dataset class works fine but I am missing something.
I have made my notebook openly available and can be accessed here. I am obtaining sentinel-2 optical imagery and trying to segment floodwater from the imagery, with the unet model. So basically binary segmentation (floodwater or not floodwater).
Any help would be greatly appreciated. Thanks!