admin管理员组文章数量:1122832
I have a custom dataset (images of pizza,sushi and steak). I'm using torch DataLoader for it , now when writing the test dataloader custom should we set shuffle=true or it just doesn't matter??
I haven't seen difference yet , but just asking the general.
I have a custom dataset (images of pizza,sushi and steak). I'm using torch DataLoader for it , now when writing the test dataloader custom should we set shuffle=true or it just doesn't matter??
I haven't seen difference yet , but just asking the general.
Share Improve this question edited Nov 21, 2024 at 21:16 Christoph Rackwitz 15.1k5 gold badges38 silver badges49 bronze badges asked Nov 21, 2024 at 19:33 YoussefYoussef2121YoussefYoussef2121 11 Answer
Reset to default 0If you use shuffle=True
it should reshuffle the data at each epoch (from PyTorch documentation). This means that at each epoch, the batches of data will be arranged differently with respect to the previous one.
During testing, since during testing the model doesn't change and you don't usually test for multiple epochs, it shouldn't make any difference.
However, setting shuffle=False
, ensures consistency in the order of predictions, and it may make debugging easier.
本文标签:
版权声明:本文标题:machine learning - in testing dataset using dataloader , should we set shuffle=true or it doesn't matter? - Stack Overfl 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307666a1933392.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论