Livox-SDK/livox_detection_simu

Tensorflow Error

Closed this issue · 3 comments

My environment

  • ubuntu 18.04 LTS
  • python 3.6.9
  • tensorflow 1.15

I got the following error when I ran "python livox_detection_simu.py"

suzuki@ubuntu:~/Downloads/livox_detection_simu$ python3 livox_detection_simu.py
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

1008 224 30
WARNING:tensorflow:From /home/suzuki/Downloads/livox_detection_simu/networks/model.py:27: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

(1, 1008, 224, 30)
WARNING:tensorflow:From /home/suzuki/venv/lib/python3.6/site-packages/tensorflow_core/contrib/layers/python/layers/layers.py:1057: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.
Instructions for updating:
Please use layer.__call__ method instead.
WARNING:tensorflow:From /home/suzuki/Downloads/livox_detection_simu/networks/model.py:70: The name tf.image.resize_bilinear is deprecated. Please use tf.compat.v1.image.resize_bilinear instead.

WARNING:tensorflow:From livox_detection_simu.py:66: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

WARNING:tensorflow:From livox_detection_simu.py:67: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From livox_detection_simu.py:71: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2021-04-28 01:42:50.203964: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-04-28 01:42:50.225177: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2592005000 Hz
2021-04-28 01:42:50.226874: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4db39c0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-04-28 01:42:50.226934: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2021-04-28 01:42:50.231211: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/suzuki/catkin_ws/devel/lib:/home/suzuki/Downloads/ws_livox/devel/lib:/opt/ros/melodic/lib
2021-04-28 01:42:50.231847: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)
2021-04-28 01:42:50.231894: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (ubuntu): /proc/driver/nvidia/version does not exist
Traceback (most recent call last):
File "livox_detection_simu.py", line 320, in
livox = Detector()
File "livox_detection_simu.py", line 72, in init
saver.restore(self.sess, cfg.MODEL_PATH)
File "/home/suzuki/venv/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1280, in restore
if not checkpoint_management.checkpoint_exists_internal(checkpoint_prefix):
File "/home/suzuki/venv/lib/python3.6/site-packages/tensorflow_core/python/training/checkpoint_management.py", line 366, in checkpoint_exists_internal
if file_io.get_matching_files(pathname):
File "/home/suzuki/venv/lib/python3.6/site-packages/tensorflow_core/python/lib/io/file_io.py", line 363, in get_matching_files
return get_matching_files_v2(filename)
File "/home/suzuki/venv/lib/python3.6/site-packages/tensorflow_core/python/lib/io/file_io.py", line 384, in get_matching_files_v2
compat.as_bytes(pattern))
tensorflow.python.framework.errors_impl.NotFoundError: model; No such file or directory

How do I get it to work?

Thank you for your answer

I solved it myself.
I had extracted the pre_trained model to the wrong place.

I solved it myself.
I had extracted the pre_trained model to the wrong place.

hello,I met the same error ,could you tell me where should the pre-trained model placed? Thanks very much!!

As written in config/config.py, the pre-trained model needs to be located in 'model/model.ckpt'.
You have to create a model directory and move the pre-trained model into it.