diff --git a/recommenders/models/deeprec/models/sequential/sum_cells.py b/recommenders/models/deeprec/models/sequential/sum_cells.py index d66ae60e9..db83ab261 100644 --- a/recommenders/models/deeprec/models/sequential/sum_cells.py +++ b/recommenders/models/deeprec/models/sequential/sum_cells.py @@ -3,7 +3,10 @@ import numpy as np import tensorflow as tf -from keras.layers.legacy_rnn.rnn_cell_impl import LayerRNNCell +try: + from keras.layers.legacy_rnn.rnn_cell_impl import LayerRNNCell +except: + from keras.layers.rnn import AbstractRNNCell as LayerRNNCell from tensorflow.python.eager import context from tensorflow.python.keras import activations from tensorflow.python.keras import initializers diff --git a/setup.py b/setup.py index 975727660..caa526087 100644 --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ "pytest>=3.6.4", "pytest-cov>=2.12.1", "pytest-mock>=3.6.1", # for access to mock fixtures in pytest - "packaging>=20.9", # for version comparison in test_dependency_security.py + "packaging>=20.9", # for version comparison in test_dependency_security.py ], } # For the brave of heart