Skip to content

Commit

Permalink
support keras2 & keras3
Browse files Browse the repository at this point in the history
  • Loading branch information
TjarkMiener committed Oct 18, 2024
1 parent 43547b2 commit a953e4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dl1_data_handler/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def __init__(
tasks,
batch_size=64,
random_seed=0,
**kwargs,
):
super().__init__(**kwargs)
"Initialization"
self.DLDataReader = DLDataReader
self.indices = indices
Expand Down Expand Up @@ -82,4 +84,7 @@ def __getitem__(self, index):
),
axis=1,
)
# Temp fix for supporting keras2 & keras3
if int(keras.__version__.split(".")[0]) >= 3:
features = features["input"]
return features, labels

0 comments on commit a953e4e

Please sign in to comment.