NameError: name 'pil2tensor' is not defined

Hello,

I have switched from Fastai v1 to v2. I am encountering the problem witch creating the DataBlock. I think the error is related to loading images:

NameError: name ‘pil2tensor’ is not defined.

The error refers to part where I load images:

img = Image(pil2tensor(img, dtype=np.float32).div_(255))

I would be grateful for any help.

Thanks,
Lubos