geoffrey-anto / drones-attention-based-lstm-deep-q-network-rpp

A Realtime Path Planning AIRSIM Simulation Using Deep Q Learning With Attention Based LSTM
MIT License
2 stars 0 forks source link

ImportError: cannot import name '_saturate_cast' from 'keras.src.ops.core' #3

Open kongbinGH opened 3 weeks ago

kongbinGH commented 3 weeks ago

D:\anaconda3\envs\drones\python.exe D:\PycharmProj\drones-attention-based-lstm-deep-q-network-rpp-main\main.py 2024-10-30 19:26:50.543598: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2024-10-30 19:26:51.010488: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. Traceback (most recent call last): File "D:\PycharmProj\drones-attention-based-lstm-deep-q-network-rpp-main\main.py", line 2, in from src.Simulation import Simulation File "D:\PycharmProj\drones-attention-based-lstm-deep-q-network-rpp-main\src\Simulation.py", line 6, in from src.DQNLSTM import DQNLSTM File "D:\PycharmProj\drones-attention-based-lstm-deep-q-network-rpp-main\src\DQNLSTM.py", line 4, in from tensorflow.keras.layers import LSTM, Dense, Attention, Input File "D:\anaconda3\envs\drones\lib\site-packages\keras_tf_keras\keras__init.py", line 27, in from keras._tf_keras.keras import backend File "D:\anaconda3\envs\drones\lib\site-packages\keras_tf_keras\init.py", line 1, in from keras._tf_keras import keras File "D:\anaconda3\envs\drones\lib\site-packages\keras_tf_keras\keras\init.py", line 28, in from keras._tf_keras.keras import layers File "D:\anaconda3\envs\drones\lib\site-packages\keras_tf_keras\keras\layers\init__.py", line 142, in from keras.src.layers.preprocessing.image_preprocessing.auto_contrast import ( File "D:\anaconda3\envs\drones\lib\site-packages\keras\src\layers\preprocessing\image_preprocessing\auto_contrast.py", line 7, in from keras.src.ops.core import _saturate_cast ImportError: cannot import name '_saturate_cast' from 'keras.src.ops.core' (D:\anaconda3\envs\drones\lib\site-packages\keras\src\ops\core.py)

Process finished with exit code 1 ———————————————————————————————————————————————————————————

I followed the version requirements given by the author and ran main.py, but the above error message appeared. I tried to uninstall keras, because tensroflow3.X version comes with keras, but it still didn't work. How can I solve this problem? Looking forward to your reply.

geoffrey-anto commented 3 weeks ago

Can you also please send the python version you are using along with the exact packages versions, and also the project is currently under development. I will get back to you asap as I'm on vacation currently.

kongbinGH commented 3 weeks ago

OK, thank you very much for your reply. Below is myrequirements1.txt that I exported, please have a look. If you need anything else, I will provide relevant information at any time. myrequirements1.txt

kongbinGH commented 3 weeks ago

Can you also please send the python version you are using along with the exact packages versions, and also the project is currently under development. I will get back to you asap as I'm on vacation currently.

Oh, my Python version is 3.9. AirSim version is 1.6.0-Windows, and the UE4 environment used is Blocks. Please check the versions of other dependent packages in myrequirements1.txt.