Class Dataset for DICOM IMAGES runs on CPU instead of GPU

def open_dicom(fn):
t=transform.resize(x.pixel_array, (512, 512))
im = np.stack([t]*3,0)
return Image(torch.Tensor(im))

class DicomItemList(ObjectItemList):
def open(self, fn): return open_dicom(fn)

data = (DicomItemList.from_df(tr,path=data_folder ,cols=‘image_id’,suffix=’.dicom’)
.databunch(bs=16, collate_fn=bb_pad_collate)

My GPU is enabled but still, it runs on CPU. Can anyone tell me where am I going wrong?

What is the correct procedure?