What is the purpose of Collate fn
jaideep11061982 opened this issue · 1 comments
jaideep11061982 commented
Thanks for creating this repository . could u please explain out the purpose of collate in dataloader
Rayhane-mamah commented
Hi,
Sorry for the late reply. As confusing as it may seem, collate is actually there to handle if a sample has a bad/non-existent face crop. dlib sometimes messes up the crop or simply doesn't find faces in a video, and the collate is there to typically get rid of such samples from the batch. Keep in mind this might result in a batch of supposedly 32 images having only 28 images.
I hope this answers your question.