Just looking at the source and all it is is:
class ToTensor(Transform):
"Convert item to appropriate tensor class"
order = 5
I don’t see anything that converts anything into a tensor. So what am I missing? Or what is going on here?
Just looking at the source and all it is is:
class ToTensor(Transform):
"Convert item to appropriate tensor class"
order = 5
I don’t see anything that converts anything into a tensor. So what am I missing? Or what is going on here?
If you look in a separate file you’ll see class decors for @ToTensor
.
I was confused by this as well. I believe the intention is to only have ToTensor
provide this functionality if you import fastai.vision
. If not, it’s essentially a noop.