@gphilip, I have performed pixel classification of Hyperspectral Image using the above mentioned model. I have extracted the patches mentioned as FPatches around the neighbourhood of the pixel and consider them as samples. The label of the center pixel of the FPatch is considered as the label for the entire FPatch.  The model is trained using training samples and tested using test samples. Test accuracy is more than 99 percent. For obtaining the classification map I have taken the entire FPatches and predicted the labels using the same trained model. Finally I have converted the predicted classes into array to get the classification map. One important thing to mention is that the groundtruth contains background pixels denoted as 0 so when the classification map array is generated we will keep those classes as zero.