Skip to content

bug when using PIL backend in classification references #7664

@AetelFinch

Description

@AetelFinch

🐛 Describe the bug

When I try to train a model using the train.py script under references/classification with the PIL backend, I encounter an error:

ValueError: backend can be 'tensor' or 'pil', but got pil

To reproduce this issue, you can write:

git clone https://github.com/pytorch/vision && cd vision
conda create -n vision_env python=3.9
conda activate vision_env
pip install torch==1.13.1 torchvision
cd references/classification/
python train.py --data-path "path-to-dataset" --test-only --backend pil

Versions

[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.3
[pip3] torch==1.13.1
[pip3] torchvision==0.14.1
[conda] numpy 1.24.3 pypi_0 pypi
[conda] torch 1.13.1 pypi_0 pypi
[conda] torchvision 0.14.1 pypi_0 pypi

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