From 43bef6b418273b0a832f74db06ce6d458def9631 Mon Sep 17 00:00:00 2001 From: Bosco Yung <15840328+bhky@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:09:56 +0900 Subject: [PATCH] Directly importing backend from keras_core (to see whether that still requires TF) --- tests/_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/_test.py b/tests/_test.py index 6807a94..295472a 100644 --- a/tests/_test.py +++ b/tests/_test.py @@ -5,7 +5,7 @@ import unittest from typing import Optional, Sequence -import keras_core +from keras_core import backend as keras_backend import opennsfw2 as n2 @@ -38,7 +38,7 @@ def _assert( self.assertTrue(os.path.exists(paths[i])) def test_predict_images_yahoo_preprocessing(self) -> None: - if keras_core.backend.backend() == "tensorflow": + if keras_backend.backend() == "tensorflow": grad_cam_paths = OUTPUT_GRAD_CAM_PATHS else: grad_cam_paths = None