Class Dataset for DICOM IMAGES runs on CPU instead of GPU

def open_dicom(fn):
x=dcmread(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’)
.split_by_rand_pct(0.2)
.label_from_func(get_y_func)
.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?