This is the code for the ACM MM 2024 paper :SCPSN: Spectral Clustering-based Pyramid Super-resolution Network for Hyperspectral Images. We will make it public after publication
pytorch 1.13.1scikit-learn 1.3.2
This is a Loss function setting examples as a scale factor of ×4model = main(in_channels=191, num_clusters=16, )out, out1, out2= model(MS_image)
loss = criterion(outputs, to_variable(reference))
loss1 = criterion(out1, to_variable(downX2(reference)))
loss2 = criterion(out2, to_variable(downX2(downX2(reference))))
SAM_loss = SAM(outputs, to_variable(reference))
loss = loss + SAM_loss / (SAM_loss / loss).detach() + loss1 / (loss1 / loss).detach() + loss2 / (loss2 / loss).detach()