Hi,
I am doing “deep learning for robotics”. In unit4, the exercise is to integrate the given codes into a main.py
to implement process of CNN. But actually the solution doesn’t work and show errors like this:
2022-12-22 15:21:07.356609: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2022-12-22 15:21:07.401055: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot openshared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/catkin_ws/devel/lib:/home/simulations/public_sim_ws/devel/lib:/opt/ros/noetic/lib:/opt/ros/noetic/lib/x86_64-linux-gnu:/usr/local/cuda-10.2/lib64:/home/user/.catkin_ws_python3/src/TensorRT-7.0.0.11/lib:/usr/local/cuda-10.2/lib64:/home/user/.catkin_ws_python3/src/TensorRT-7.0.0.11/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins
2022-12-22 15:21:07.401707: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2022-12-22 15:21:07.402863: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (4_xterm): /proc/driver/nvidia/version does not exist
2022-12-22 15:21:07.407000: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-12-22 15:21:07.413290: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2022-12-22 15:21:08.168443: W tensorflow/core/framework/cpu_allocator_impl.cc:80] Allocation of 491520000 exceeds 10% of free system memory.
Killed
Unfortunately I cannot understand this error information.
By the way, there is an obvious problem about Keras
. When we import on our own PC compilers like:
import keras
import tensorflow as tf
everything goes normally.
But when we import like:
import tensorflow.keras as keras
the CMD will tell that no module named 'keras'
. This has been a universal bug about keras.
However, in webshell of TheConstruct, import tensorflow.keras
works fine. Can anyone inform me of how TheConstruct achieve this correction? I have tried some methods from Google to solve this bug on my own Vscode, but nothing works. It seem TheConstruct has already solved this…