Hello everyone. I’m trying to create a custom dataset from grayscale image (as below code) but when i call dataloader, it returns a 3d tensor BatchxRowxCols rather than BatchxChannelxRowxCols. can anyone help me ?
    def __getitem__(self,idx): 
        img = skimage.io.imread(self.filenames[idx])
        return img

and my transformation is
trans = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))])```