class Data(Dataset):
  def __init__(self,images,labels,transform=None):
    self.images=images
    self.labels=labels    #The floating point values for that images you want to return.
    # Encode the labels and then append the training images and labels together.
    # For eg : images[0]=directory of image 0 and labels[0]=label for that particular image
    self.transform=transform
  def __getitem__(self,idx):
    image_name = self.images[idx]
    image = cv2.imread(image_name)
    b, g, r = cv2.split(image)
    image = cv2.merge((r, g, b))
    if self.transform:
      image=self.transform(image)
    return image,self.labels[idx]
  def __len__(self):
    return len(self.images)

So instead of passing the floating point values through the network architecture, you can simply return the floating point values in the DataLoader itself.