From f776906826ff9f66828f442a792c2521ea830167 Mon Sep 17 00:00:00 2001 From: Max Chuprov Date: Sat, 10 Jun 2023 22:33:03 +0700 Subject: [PATCH] fix bug when using PIL backend in references/classification --- references/classification/presets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/references/classification/presets.py b/references/classification/presets.py index a710f92ae88..0f2c914be7e 100644 --- a/references/classification/presets.py +++ b/references/classification/presets.py @@ -69,11 +69,10 @@ def __init__( backend="pil", ): trans = [] - backend = backend.lower() if backend == "tensor": trans.append(transforms.PILToTensor()) - else: + elif backend != "pil": raise ValueError(f"backend can be 'tensor' or 'pil', but got {backend}") trans += [