Skip to content

Commit b67cfea

Browse files
committed
Rename KerasBackend -> TFKerasBackend to avoid confusion with keras 3.
1 parent f33113e commit b67cfea

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

einops/_backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def einsum(self, pattern, *x):
466466
return self.tf.einsum(pattern, *x)
467467

468468

469-
class KerasBackend(AbstractBackend):
469+
class TFKerasBackend(AbstractBackend):
470470
framework_name = "tensorflow.keras"
471471

472472
def __init__(self):

tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def collect_test_backends(symbolic=False, layers=False) -> List[_backends.Abstra
8686
backend_types = []
8787
else:
8888
backend_types = [
89-
_backends.KerasBackend,
89+
_backends.TFKerasBackend,
9090
]
9191

9292
backend_names_to_test = parse_backends_to_test()

tests/test_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ def logsumexp_numpy(x, tuple_of_axes):
351351
y = numpy.sum(y, axis=tuple_of_axes)
352352
return numpy.log(y) + minused
353353

354-
from einops._backends import TorchBackend, ChainerBackend, TensorflowBackend, KerasBackend, NumpyBackend
354+
from einops._backends import TorchBackend, ChainerBackend, TensorflowBackend, TFKerasBackend, NumpyBackend
355355

356356
backend2callback = {
357357
TorchBackend.framework_name: logsumexp_torch,
358358
ChainerBackend.framework_name: logsumexp_chainer,
359359
TensorflowBackend.framework_name: logsumexp_tf,
360-
KerasBackend.framework_name: logsumexp_keras,
360+
TFKerasBackend.framework_name: logsumexp_keras,
361361
NumpyBackend.framework_name: logsumexp_numpy,
362362
}
363363

0 commit comments

Comments
 (0)