Skip to content

[Feature_Request] datasets class_to_idx for all datasets #237

Open
@MrtnMndt

Description

@MrtnMndt

So I noticed that in torchvision.datasets only the ImageFolder class actually has the member called
class_to_idx.

Is there a reason why this isn’t just hard-coded for the other datasets like MNIST, CIFAR and so on, so that one could readily use it for actually getting a class-string for all sorts of visualizations + confusion matrices?

It does seem a little inconvenient to go and manually define the list of all 100 classes for e.g. CIFAR-100.
Do you think this is something that could be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions