File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ pre-commit = ">=2.20.0"
51
51
pytest = " >=7.1.2"
52
52
pytest-cov = " >=3.0.0"
53
53
sphinx = " >=5.0.2"
54
+ tensorflow = " >=2.16.1"
54
55
55
56
[tool .ruff ]
56
57
select = [
Original file line number Diff line number Diff line change 3
3
4
4
import keras as keras
5
5
import keras .saving
6
- import keras .saving .object_registration
7
6
import numpy as np
8
- from keras .saving .saving_lib import load_model , save_model
7
+ from keras .src . saving .saving_lib import load_model , save_model
9
8
10
9
11
10
def unpack_keras_model (
@@ -25,7 +24,7 @@ def pack_keras_model(
25
24
"""Support for Pythons's Pickle protocol."""
26
25
tp = type (model )
27
26
out = BytesIO ()
28
- if tp not in keras .saving .object_registration . GLOBAL_CUSTOM_OBJECTS :
27
+ if tp not in keras .saving .get_custom_objects () :
29
28
module = "." .join (tp .__qualname__ .split ("." )[:- 1 ])
30
29
name = tp .__qualname__ .split ("." )[- 1 ]
31
30
keras .saving .register_keras_serializable (module , name )(tp )
Original file line number Diff line number Diff line change 5
5
from keras import losses as losses_module
6
6
from keras import metrics as metrics_module
7
7
from keras import optimizers as optimizers_module
8
- from keras .backend .common .variables import KerasVariable
9
8
from keras .layers import Dense , Input
10
9
from keras .models import Model
10
+ from keras .src .backend .common .variables import KerasVariable
11
11
from sklearn .datasets import make_classification
12
12
13
13
from scikeras .wrappers import KerasClassifier
You can’t perform that action at this time.
0 commit comments