After Image Augmentation, labels are messed up! Pytorch

username: mj779
cooked: <p>Hi everone, <img src="https://discuss.pytorch.org/images/emoji/apple/smiley.png?v=12" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20">I am doing a project on cat breeds classification. As I am doing data augmentation, the number of images is doubled but the labels do not match the augmented images. Here is my code.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/e/de1364c8aa1926f25c4c6357858ab0678bd38483.png" data-download-href="https://discuss.pytorch.org/uploads/default/de1364c8aa1926f25c4c6357858ab0678bd38483" title="Screen Shot 2020-12-05 at 5.07.25 PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/d/e/de1364c8aa1926f25c4c6357858ab0678bd38483_2_504x500.png" alt="Screen Shot 2020-12-05 at 5.07.25 PM" data-base62-sha1="vGzy3d2hLQrxh4wi3TGzvINA8Uz" width="504" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/d/e/de1364c8aa1926f25c4c6357858ab0678bd38483_2_504x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/d/e/de1364c8aa1926f25c4c6357858ab0678bd38483_2_756x750.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/d/e/de1364c8aa1926f25c4c6357858ab0678bd38483.png 2x" data-dominant-color="EBEAEA"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 2020-12-05 at 5.07.25 PM</span><span class="informations">816×809 117 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: mj779
cooked: <p>The augmented images do not have correct labels.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/6/e/6e62a4fc328502e83e0ca37c517cf72e0c3a23a7.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/6e62a4fc328502e83e0ca37c517cf72e0c3a23a7" title="Screen Shot 2020-12-05 at 5.03.19 PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e62a4fc328502e83e0ca37c517cf72e0c3a23a7_2_690x126.jpeg" alt="Screen Shot 2020-12-05 at 5.03.19 PM" data-base62-sha1="fKvRJ3aBzIUkTfxWDjkgVZGBEVx" width="690" height="126" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e62a4fc328502e83e0ca37c517cf72e0c3a23a7_2_690x126.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e62a4fc328502e83e0ca37c517cf72e0c3a23a7_2_1035x189.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/6/e/6e62a4fc328502e83e0ca37c517cf72e0c3a23a7_2_1380x252.jpeg 2x" data-dominant-color="B0A8A2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 2020-12-05 at 5.03.19 PM</span><span class="informations">1433×263 115 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: ptrblck
cooked: <p>The number of images won’t change, since the transformations are applied on the fly in the <code>__getitem__</code> method, so I would recommend to recheck, if the image folders contain unexpected files.</p>