🐛 fix enum check

This commit is contained in:
Faylixe
2020-12-08 13:34:16 +01:00
parent 72e74aaf22
commit a4d668b612

View File

@@ -42,8 +42,7 @@ class STFTBackend(str, Enum):
@classmethod
def resolve(cls: type, backend: str) -> str:
backend = backend.upper()
if backend not in cls.__members__.keys():
if backend not in cls.__members__.values():
raise ValueError(f'Unsupported backend {backend}')
if backend == cls.AUTO:
if len(tf.config.list_physical_devices('GPU')):