Ty for reply. I came up with something like this:
 
from torch.utils.data.dataset import Dataset
import scipy.io as io
 class MyDataset(Dataset):
   def __init__(self, mat_path, gt_path):      
       data = io.loadmat(mat_path)['pavia']
       data = numpy.uint8(data)
       self.images = torch.from_numpy(data)
       data_gt = io.loadmat(gt_path)
       self.target = torch.from_numpy(data_gt['pavia_gt'])            
 
  def __getitem__(self, index):
       x = self.images[index]
       y = self.target[index]
       return x, y
     
   def __len__(self):
       return len(self.images)

mat_path = ('./data/Pavia.mat')
gt_path = ('./data/Pavia_gt.mat')
custom_dataset = MyDataset(mat_path, gt_path)
train_loader = torch.utils.data.DataLoader(dataset=custom_dataset,
                                           batch_size=64, 
                                           shuffle=True)

Now i have no idea how to use this in torch.utils.data
Or should i make a Train/Test Set split first?