Skip to content

Error related to keras #30

@SExpert12

Description

@SExpert12

Hi, I am getting this error. I tried to change as suggested in this but still I am not able to run the file.

pygame 2.0.1 (SDL 2.0.14, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
/home/.local/lib/python3.8/site-packages/pandas/core/computation/expressions.py:20: UserWarning: Pandas requires version '2.7.3' or newer of 'numexpr' (version '2.7.1' currently installed).
from pandas.core.computation.check import NUMEXPR_INSTALLED
WARNING:tensorflow:From main.py:9: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.config.list_physical_devices('GPU') instead.
2024-06-26 03:13:12.082157: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2024-06-26 03:13:12.104117: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 3593325000 Hz
2024-06-26 03:13:12.105007: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fe1cc000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2024-06-26 03:13:12.105049: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2024-06-26 03:13:12.107924: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2024-06-26 03:13:12.134793: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2024-06-26 03:13:12.134833: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host:
2024-06-26 03:13:12.134841: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: zenten
2024-06-26 03:13:12.134935: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:200] libcuda reported version is: 535.171.4
2024-06-26 03:13:12.134959: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:204] kernel reported version is: 535.171.4
2024-06-26 03:13:12.134966: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:310] kernel version seems to match DSO: 535.171.4
Traceback (most recent call last):
File "main.py", line 11, in
from core import learning
File "/home/carla-driving-rl-agent-master/core/init.py", line 2, in
from core.carla_agent import CARLAgent, FakeCARLAEnvironment
File "/home/carla-driving-rl-agent-master/core/carla_agent.py", line 8, in
import rl
File "/home/carla-driving-rl-agent-master/rl/init.py", line 1, in
import rl.augmentations
File "/home/carla-driving-rl-agent-master/rl/augmentations/init.py", line 2, in
from rl.augmentations.augmentations import *
File "/home/carla-driving-rl-agent-master/rl/augmentations/augmentations.py", line 7, in
from rl import utils
File "/home/carla-driving-rl-agent-master/rl/utils.py", line 16, in
from tensorflow.keras.optimizers.schedules import LearningRateSchedule
File "/home/.local/lib/python3.8/site-packages/tensorflow/keras/init.py", line 19, in
from . import datasets
File "/home/.local/lib/python3.8/site-packages/tensorflow/keras/datasets/init.py", line 14, in
from . import imdb
File "/home/.local/lib/python3.8/site-packages/tensorflow/keras/datasets/imdb/init.py", line 11, in
from tensorflow.python.keras.datasets.imdb import get_word_index
File "/home/.local/lib/python3.8/site-packages/tensorflow/python/keras/datasets/imdb.py", line 25, in
from tensorflow.python.keras.preprocessing.sequence import _remove_long_seq
File "/home/.local/lib/python3.8/site-packages/tensorflow/python/keras/preprocessing/init.py", line 26, in
from tensorflow.python.keras.preprocessing import image
File "/home/.local/lib/python3.8/site-packages/tensorflow/python/keras/preprocessing/image.py", line 23, in
from keras_preprocessing import image
File "/home/.local/lib/python3.8/site-packages/keras_preprocessing/image.py", line 20, in
backend = get_keras_submodule('backend')
File "/home/.local/lib/python3.8/site-packages/keras_preprocessing/init.py", line 24, in get_keras_submodule
raise ImportError('You need to first import keras '
ImportError: You need to first import keras in order to use keras_preprocessing. For instance, you can do:

import keras
from keras_preprocessing import image

Or, preferably, this equivalent formulation:

from keras import preprocessing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions