As the title says, I’m trying to do some speed test on my data loading code. I am wondering if adding all kinds of transform to transform.Compose() will affect the speed of data loading?
Thank you.
As the title says, I’m trying to do some speed test on my data loading code. I am wondering if adding all kinds of transform to transform.Compose() will affect the speed of data loading?
Thank you.
All compose does is apply the transform one by one
for t in self.transforms:
img = t(img)
return img
So adding all the transforms to compose is same as applying them one-by-one.
So if i want to make it as slow, i should add as much transformation as possible? Or creating own augmentation function would be better?
This is true.
Torchvision transforms are written in C++ internally, so they are already fast.