Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions policy/openbot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import os

# Force the legacy Keras (Keras 2) backend so this code, which targets the
# Keras 2 model API, also works on TensorFlow >= 2.16 (which switched to Keras 3
# by default and would otherwise raise "the layer ... has never been called"
# during model building). Must be set before TensorFlow is imported.
os.environ.setdefault("TF_USE_LEGACY_KERAS", "1")


def mkdir(path):
if not (os.path.exists(path)):
Expand Down
Loading