I’ve been experimenting with Transforms, and it seems that when we pass a picture to a transform like
CenterCrop, it only outputs 1 picture, where the original is lost.
So, we’re losing the original picture.
My idea of data augmentation was of training on
augmented_data = original_data + transformed_data… but it seems that if we use transforms, we’ll be training only on the
- How would we work in PyTorch with the
augmented_dataas defined above when implementing my own custom Dataset?
Some transforms, like
FiveCrop output more than 1 picture. According to this PyTorch documentation page, it seems to recommend to use
torch.stack to stack the ‘tensorized’ pictures. However, when I do that I’m creating an extra dimension on my final tensor. So, instead of a 3D (unbatched) or 4D (batched) tensor, I’ll have a 4D(unbatched) / 5D (batched), where in the initial dimension, I’ll have the number of pictures outputted by the the transforms.
- How does one work with Transforms like
FiveCrop, which output more than 1 picture, when creating our custom Dataset?