@ptrblck I did what u said and now got this error
image= torch.cat((image_BW, image_RGB), 1)
TypeError: expected Tensor as element 0 in argument 0, but got BmpImageFile
class bothDataset(Dataset):
    '''
    Initilize custom Dataset for image analysis
    It should correlate image with label for training dataset
    '''

    def __init__(self, csv_path, root_dir, transform=None):
        """Init function should not do any heavy lifting, but
            must initialize how many items are available in this data set.
            
            Args:
                csv_path : Path to the csv where classes (labels) and image names are located accordingly
                root_dir : Directory with all images
                transform: Optional transform to be applied on a sample
        """
        
        #df = pd.read_csv(csv_path)#, sep=',',index_col=0)
        self.img_names = pd.read_csv(csv_path)
        self.transform = transform
        self.root_dir = root_dir
        #self.images = read_images(root + "/images")
        #self.labels = read_labels(root + "/labels")

    def __len__(self):
        """return number of points in our dataset"""

        return len(self.img_names)

    def __getitem__(self, idx):
        """ Here we have to return the item requested by `idx`
            The PyTorch DataLoader class will use this method to make an iterable for
            our training or validation loop.
        """

        if torch.is_tensor(idx):
            idx = idx.tolist()

        img_name_BW = os.path.join(self.root_dir,
                                self.img_names.iloc[idx, 0])
        image_BW = Image.open(img_name_BW+'.bmp')
        img_name_RGB = os.path.join(self.root_dir,
                                self.img_names.iloc[idx, 1])
        image_RGB = Image.open(img_name_RGB+'.bmp')
        image= torch.cat((image_BW, image_RGB), 1) 
        #image = io.imread(img_name+'.jpg')
        #image = cv2.imread(img_name+'.jpg')
        #image=image_BW
        label = self.img_names.iloc[idx, 2]
        #label = np.array([label])
        #label = label.astype('float')#.reshape(-1, 2)
        #sample = {'image': image, 'label': label}

        if self.transform:
            image = self.transform(image)
            
        return image, label                                   
train_datak = bothDataset(csv_path='RelationBS1.csv',
                               root_dir=test_folder, 
                                  transform=train_transform)
print('Num training images: ', len(train_datak))
batch_size =64
num_workers=0

# prepare data loaders
train_loader = torch.utils.data.DataLoader(train_datak, batch_size=batch_size, 
                                           num_workers=num_workers, shuffle=True)
dataiter = iter(train_loader)
images, labels = dataiter.next()  
print(type(images))
print(images.shape)