Install Epel
$ sudo yum install Epel-release
installing a dependent system library
# $ sudo yum update
$ sudo yum install-y \
automake \
cmake3 \
gcc \
gcc-c++ \
git \
kernel-d EVEL \
leveldb-devel \
lmdb-devel \
libtool \
protobuf-devel \
python-devel
\ PYTHON-PIP \
snappy-devel \
gflags-devel \
glog-devel
Installing a dependent Python library
$ sudo pip install--upgrade pip
$ sudo pip install \
flask \
future \
graphviz \
hypothesis \
jupyter \
matplotlib \
numpy \
protobuf \
pydot \
python-nvd3 \ Pyyaml
\ Requests \
scikit-image \
scipy \
setuptools \
six \
tornado
Compile and install Caffe2
$ git clone--recursive https://github.com/caffe2/caffe2
$ cd caffe2 && mkdir build
$ cd Build && ; Cmake3.
. $ sudo make install
Test
First use the following command to check if CAFFE2 is installed successfully
$ CD Build
$ Python-c ' from Caffe2.python import core ' 2>/dev/null && echo ' Success ' | | echo ' failure '
If the Caffe2 installation succeeds, the above command should print Success.
Second, use the following command to run a test
$ CD Build
$ python-m caffe2.python.operator_test.relu_op_test
$ python-m caffe2.python.operator_ Test.weighted_sample_test
$ python-m caffe2.python.examples.resnet50_trainer--train_data null--use_cpu True
problem
Question one
Run "python-m caffe2.python.operator_test.relu_op_tes" error
...
Traceback (most recent):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__" Main__ ", fname, loader, pkg_name)
File"/usr/lib64/python2.7/runpy.py ", line-, in _run_code
exec-code in RUN_GL Obals
File "/home/jhadmin/downloads/caffe2/build/caffe2/python/operator_test/relu_op_test.py", line < Module>
from hypothesis import given
File "/usr/lib/python2.7/site-packages/hypothesis/__init__.py", <module> from
Hypothesis.core Import given, find, example, Seed, reproduce_failure, \
File "/usr /lib/python2.7/site-packages/hypothesis/core.py ", line-<module> from
coverage.files Import Canonical_filename
importerror:cannot Import name Canonical_filename
The problem is the coverage version of Python, upgrading the coverage library
sudo pip install coverage--upgrade
question two
Run "python-m caffe2.python.operator_test.relu_op_tes" error
Attributeerror: ' Module ' object has no attribute ' full '
Problem is NumPy version problem, upgrade NumPy library
sudo pip install numpy--upgrade