Tag Archives: caffe

caffe35793;- 38382;- 39064;src/caffe/net. cpp:8 :18: fatal error: hdf5.h: No such file or directory compilation term…

After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>

error description

src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory compilation terminated. Makefile:583: recipe for target '.build_release/src/caffe/net.o' failed make: *** [.build_release/src/caffe/net.o] Error 1

operation process

step1:

Change include in makefile. Config file_ Dirs and Library_ Add/usr/include/HDF5/serial/to include_ Dirs, that is, change the first line of code below to the second line

#INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
#LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

Change to

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

step2:

In the libraries of makefile file, add HDF5_ HL and HDF5 are changed to HDF5_ serial_ HL and HDF5_ Serial, that is, change the first line of code below to the second line

#LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

Note: if the same error still occurs after following the above steps, it may be that the path of HDF5 does not match. You need to locate to find the path of HDF5, and then change it to the installation path of your system

This error indicates that the path of our HDF5. H header file has not been found. If you do not install HDF5, of course, you cannot find it. Moreover, even if you install this file, you may not be able to find it. What should we do. We use locate HDF5. H to find your installation path, and then specify it in makefile. Conf

reference

1. Caffe compilation

2. Caffe compiling HDF5

end

[Solved] Ubuntu Install caffe error: build_release/tools/caffe: error while loading shared libraries: libcudart.so.8….

1. There are three solutions on the Internet:

1) this is GitHub’s solution. Link: https://github.com/tensorflow/tensorflow/issues/5343

It can be seen that this method is still effective

2) execution order:

1 sudo ldconfig /usr/local/cuda/lib64

This feeling is ok too

3) if the above two methods are still unsolved, try the following:

The main reason for this kind of problem is that libcudart. So. 8.0 can’t be found in/usr/local/lib/directory, which can be found in usr/local/cuda-8.0/lib64/directory. Therefore, we copy libcudart. So. 8.0 through the following command. Remember to add sudo permission, otherwise it may not be copied
execute command:

1 sudo cp /usr/local/cuda-8.0/lib64/libcudart.so.8.0 /usr/local/lib/libcudart.so.8.0 && sudo ldconfig

This is where there will also be.

./build/tools/caffe: error while loading shared libraries: libcublas.so.8.0: cannot open shared object file: can not open shared object file: No such file or directory
./build/tools/caffe: error while loading shared libraries: libcurand.so.8.0: cannot open shared object file: can not open shared object file: No such file or directory
./build/tools/caffe: error while loading shared libraries: libcudnn.so.6: cannot open shared object file: can not open shared object file: No such file or directory
The corresponding name marked in yellow in the command can be changed

Execution is complete and there are no more errors!!!

Caffe installation and compilation problems – importerror: no module named skimage.io

problem description

>>> import caffe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xxx/Downloads/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/xxx/Downloads/caffe/python/caffe/pycaffe.py", line 15, in <module>
    import caffe.io
  File "/home/zrj/Downloads/caffe/python/caffe/io.py", line 2, in <module>
    import skimage.io
ImportError: No module named skimage.io

solutions

~/Downloads/caffe$ sudo apt install python-pip
~/Downloads/caffe$ pip install -U scikit-image

 

Caffe Install ImportError: No module named google.protobuf.internal

problem description

~/Downloads/caffe$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xxx/Downloads/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/xxx/Downloads/caffe/python/caffe/pycaffe.py", line 15, in <module>
    import caffe.io
  File "/home/xxx/Downloads/caffe/python/caffe/io.py", line 8, in <module>
    from caffe.proto import caffe_pb2
  File "/home/xxx/Downloads/caffe/python/caffe/proto/caffe_pb2.py", line 6, in <module>
    from google.protobuf.internal import enum_type_wrapper
ImportError: No module named google.protobuf.internal

solutions

sudo pip install  easydict
sudo pip install protobuf

 

Caffe Error-nvcc fatal:Unsupported gpu architecture ‘compute_20’

Error description

nvcc fatal   : Unsupported gpu architecture 'compute_20'
Makefile:596: recipe for target '.build_release/cuda/src/caffe/solvers/nesterov_solver.o' failed

Original makefile.config

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
        -gencode arch=compute_20,code=sm_21 \
        -gencode arch=compute_30,code=sm_30 \
        -gencode arch=compute_35,code=sm_35 \
        -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_52,code=sm_52 \
        -gencode arch=compute_60,code=sm_60 \
        -gencode arch=compute_61,code=sm_61 \
        -gencode arch=compute_61,code=compute_61

According to the information prompted in the file, you can comment part of the content

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
CUDA_ARCH := #-gencode arch=compute_20,code=sm_20 \
        #-gencode arch=compute_20,code=sm_21 \
        -gencode arch=compute_30,code=sm_30 \
        -gencode arch=compute_35,code=sm_35 \
        -gencode arch=compute_50,code=sm_50 \
        -gencode arch=compute_52,code=sm_52 \
        -gencode arch=compute_60,code=sm_60 \
        -gencode arch=compute_61,code=sm_61 \
        -gencode arch=compute_61,code=compute_61