What could be the problem here?
def __getitem__(self, index):
        target = self.lbls[index]
        # read image and convert to PIL image
        I = skimage.io.MultiImage(self.fnArr[index])[-1] 
        I = TF.to_pil_image(I, mode='RGB')
        # apply transformations, including totensor()
        I = self.transform(I)
        # here I need to transfer I to GPU so that I can apply pooling 
        I = I.cuda() # I am getting error here
        re = self.pool(I)


I need to do pooling to do some preprocessing of the image I.