Clarify ImageFolder sample ordering and indexing#9353
Clarify ImageFolder sample ordering and indexing#9353yakshithkd23 wants to merge 2 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9353
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a956b23 with merge base 14e8cb6 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@yakshithkd23 Thanks for the PR! You mentioned that your PR fixes #400, but I don't see the relationship between your PR and #400 Could you please clarify how they are related? Thank you! |
|
@zy1git Thanks for the question! In this PR, I updated the ImageFolder docstring to clarify the behavior discussed in issue #400. Specifically, I added a Notes section explaining that: Samples are sorted alphabetically by class name and file name. Samples from all classes are concatenated into a single list, and dataset indexing (e.g., dataset[i]) refers to this global list rather than a per-class subset. These points were unclear in the previous documentation and were the source of confusion described in #400. No functional changes were made—this PR only improves documentation clarity. Please let me know if you’d like the notes moved or reworded. Thank you! |
|
@yakshithkd23 Thanks for your reply. May I confirm that the issue you linked is titled "Padding with reflection [feature request]"? That one is issue #400, which has been closed for a long time. |
This PR clarifies the ImageFolder documentation by explaining:
Fixes #400