How do I convert a byte tensor into a float tensor in fastai v2?

There used to be a class ByteToFloatTensor() class, that I was passing to a pipeline, but now it seems it’s gone. Was it moved to another package?

Specifically, I’m trying to create a pipeline of Transform classes like this:

tfms = [Cuda(), ByteToFloatTensor(), Normalize(*dataset_stats)]

But ByteToFloatTensor() cannot be found anymore. Any ideas?

It’s called IntToFloatTensor now.

1 Like