caffe-cpu | Implementing the Wasserstein Loss Layer | Machine Learning library
kandi X-RAY | caffe-cpu Summary
kandi X-RAY | caffe-cpu Summary
Implementing the Wasserstein Loss Layer
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of caffe-cpu
caffe-cpu Key Features
caffe-cpu Examples and Code Snippets
Community Discussions
Trending Discussions on caffe-cpu
QUESTION
I installed Caffe-cpu on my Ubuntu 18.04 via the apt-get command, as it instructs on their official website:
...ANSWER
Answered 2019-Sep-18 at 19:38sudo apt install libcaffe-cpu-dev
QUESTION
I'm getting caffe import error even after installing it successfully using the command sudo apt install caffe-cpu
. I was able to find caffe file at /usr/lib/python3/dist-packages/caffe
(Path was added to PYTHONPATH). All requirements mentioned in the requirements.txt file of caffe directory was also installed.
I'm using Ubuntu 18.04 LTS, Python3.
Could anyone help me with this error?
...ANSWER
Answered 2019-Feb-10 at 10:00Problem solved: The error came up because caffe build wasn't done successfully. I recommend not to go up with the sudo apt install caffe-cpu
command (Which is mentioned in the official caffe installation guide for Ubuntu); because it will end up in the error as above. It's better to install from the source.
Let me give step by step guidance to install caffe successfully in Ubuntu 18.04 LTS:
1] sudo apt-get install -y --no-install-recommends libboost-all-dev
2] sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev \ libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
3] git clone https://github.com/BVLC/caffe
cd caffe
cp Makefile.config.example Makefile.config
4] sudo pip install scikit-image protobuf
cd python
for req in $(cat requirements.txt); do sudo pip install $req; done
5] Modify the Makefile.config file:
Uncomment the line CPU_ONLY := 1
, and the line OPENCV_VERSION := 3
.
6] Find LIBRARIES
line in Makefile and change it to as follows:
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5 \
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
7] make all
Now you could get some error like this:
CXX src/caffe/net.cpp
src/caffe/net.cpp:8:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
Makefile:575: recipe for target '.build_release/src/caffe/net.o' failed
make: *** [.build_release/src/caffe/net.o] Error 1
To solve this error follow step 8.
8] install libhdf5-dev
open Makefile.config, locate line containing LIBRARY_DIRS
and append /usr/lib /x86_64-linux-gnu/hdf5/serial
locate INCLUDE_DIRS
and append /usr/include/hdf5/serial/
(per this SO answer)
rerun make all
9] make test
10] make runtest
11] make pycaffe
Now you could get some error like this:
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1
To solve this error follow step 12.
12] Find PYTHON_INCLUDE
line in Makefile.config and do the changes as follows:
QUESTION
I'm installing caffe-cpu and anaconda on Ubuntu 18.04 LTS version.
Anyway, I success to install Anaconda on my system, but I'm getting in trouble to install caffe.
I found many pages such as youtube, but it isn't helpful, so i read many times to official installation manual page (I think here is the official page). In this page,
...ANSWER
Answered 2019-Feb-01 at 16:58I was able to get it working following these steps,
Get caffe source form here (https://github.com/BVLC/caffe.git)
Install CUDA if you need GPS support (https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804)
Install CUDNN, if you need GPS support (https://developer.nvidia.com/rdp/cudnn-download)
Replace existing Makefile.config with this (https://gist.github.com/GPrathap/1f9d184c55779509860b8bf92cea416d) Here I have configured for cuda 9.2. If you have a different version please search 9.2 and change the version which you have instaled. Also, please recheck all the paths which are declared in Makefile.config.
You may type
make all
followed bymake test
make distribute
for creating the final lib, an include directory of caffe which can be found in (caffe/distribute).If you are using CMake type project add where to find caffe as bellow,
QUESTION
Ubuntu 18.04
Python 2.7
My issue is I am unable to import caffe module in python even though I have installed it. I believe it is a path / env variable issue.
...ANSWER
Answered 2019-Mar-11 at 23:47When you install caffe on ubuntu using sudo apt install caffe-cpu
, it compiles the bindings for python 3 only (_caffe.cpython-36m-x86_64-linux-gnu.so
), which is located at /usr/lib/python3/dist-packages/caffe/
. So the short answer is to use python 3 instead.
The long answer is to compile caffe with python 2 bindings from source.
QUESTION
I'm trying to run a Jupyter notebook that uses Caffe. Caffe is not included in datalab. I am trying to install that library from within the Jupyter notebook (as recommended in the datalab docs), but am running into problems.
I am new to datalab, and a novice with such things generally. Any advice would be very much appreciated.
The datalab documentation suggests 3 strategies for adding a python library that is not already included. I am concentrating on the first two of these strategies.
The platform for my datacloud instance is:
platform.platform() 'Linux-4.4.111+-x86_64-with-debian-stretch-sid'
Below I'll list various things I've tried and the error messages I got. For the first strategy, I tried these things in a cell of the same notebook.
(Attempt 1)
...ANSWER
Answered 2019-Jan-09 at 18:13I tried on my end to install caffe-cpu, and it seems that the file /etc/apt/sources.list
doesn't have the needed repositories to install it, in the datalab instance. To workaround this issue, I used the following commands, in a created notebook:
QUESTION
I installed caffe-cpu on my Ubuntu v18 VM via the apt install command. I am struggling to figure out where the install directory is located, correct me if I'm wrong but I believe there is not a install directory. My NN model I'm trying to execute requires the path of build tools from caffe. How can I obtain this? I have not seen any information about this anywhere.
...ANSWER
Answered 2018-Aug-04 at 15:43The Ubuntu packages for caffe
install the caffe
executable in /usr/bin
. The particular file you want is in caffe-tools-cpu
, not caffe-cpu
as such.
From https://packages.ubuntu.com/bionic/amd64/caffe-tools-cpu/filelist:
QUESTION
I was following this guide to install caffe. I am using ubuntu 16.04 and installing caffe for cpu only(i don't have Nvidia gpu).
https://chunml.github.io/ChunML.github.io/project/Installing-Caffe-CPU-Only/
But encountered the following error :
ANSWER
Answered 2018-May-30 at 04:57/usr/bin/ld: cannot find -lhdf5_hl
-lhdf5_hl
means libhdf5_hl.so
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install caffe-cpu
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page