Skip to content

Commit 7af1b79

Browse files
Prefer keras from tensorflow instead of standalone keras in model adapter
1 parent 7a66232 commit 7af1b79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bioimageio/core/prediction_pipeline/_model_adapters/_keras_model_adapter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import warnings
22
from typing import List, Optional, Sequence
33

4-
import keras
4+
try:
5+
from tensorflow import keras
6+
except Exception:
7+
import keras
58
import xarray as xr
69

710
from ._model_adapter import ModelAdapter

0 commit comments

Comments
 (0)