Open ailabuser opened 2 years ago
Yes, the py.test failed because of this issue. It is noteworthy to mention that the attribute has been moved to keras.utils in keras 2.9....In your deep_learning4e.py file, replace
from keras.preprocessing import sequence
with
from keras.utils import pad_sequences
Cheers, Teslim.
Yes, the py.test failed because of this issue. It is noteworthy to mention that the attribute has been moved to keras.utils in keras 2.9....In your deep_learning4e.py file, replace
from keras.preprocessing import sequence
with
from keras.utils import pad_sequences
Cheers, Teslim.
Your answer helped me, to add, let's remove "sequences." from all sequence.pad_sequences in the file.
thank u so much for help me, both of u!
FAILED tests/test_deep_learning4e.py::test_rnn - AttributeError: module 'keras.preprocessing.sequence' has no attribute 'pad_sequences'
Need to replace 'keras.preprocessing.sequence' with 'keras_preprocessing.sequence'
Python 3.8.13, Tensorflow 2.10.0, Keras 2.10.0