Skip to content

Commit cff78aa

Browse files
AetelFinchMax Chuprov
andauthored
fix bug when using PIL backend in references/classification (#7665)
Co-authored-by: Max Chuprov <[email protected]>
1 parent 657027f commit cff78aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

references/classification/presets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ def __init__(
6969
backend="pil",
7070
):
7171
trans = []
72-
7372
backend = backend.lower()
7473
if backend == "tensor":
7574
trans.append(transforms.PILToTensor())
76-
else:
75+
elif backend != "pil":
7776
raise ValueError(f"backend can be 'tensor' or 'pil', but got {backend}")
7877

7978
trans += [

0 commit comments

Comments
 (0)