So I was following the five-crop documentation and everything is going great until I am trying to wrap my head around how my labels are going to be synced with input images?
I have a csv file which contains 1 hot encodings, think dogs vs cats. In my dataloader I have batch size of 8 so after five-crop augmentation, I have the batch size of [8, 5, 3, 256, 256]
. I then did .view(-1, 3, 256, 256)
which then gives me 40 images in a batch, now question is how do I make sure the labels are paired correctly? A quick look at the images shows that they are in order, so I am guessing I need to expand my label from [8] to [8, 5] and collapse it into [40] is this correct? Is this the correct way of doing this? Also how do I duplicate each element in a tensor 5 times so I can have 40 labels?