This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build Caffe2 CPU version on windows platform with python3: | |
1. Pip install prerequisites packages | |
2. Download protobuffer3.1(.exe file) from website | |
3. Add code in caffe2\caffe2\python\pybind_state.cc to build correctly for Python3.5: | |
#if PY_MAJOR_VERSION >= 3 | |
#ifndef PyString_AsString | |
#define PyString_AsString PyUnicode_AsUTF8 | |
#endif | |
#ifndef PyString_Check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
- Ubuntu 16.04 | |
- Python 3.5 | |
Prerequisite: | |
- clone and prepare caffe environment according to this guide: http://caffe.berkeleyvision.org/install_apt.html | |
- Steps: | |
1. General dependencies: | |
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler | |
sudo apt-get install --no-install-recommends libboost-all-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
- Ubuntu 16.04 | |
- Python 2.7.12 | |
Prerequisite: | |
- clone and prepare caffe environment according to this guide: http://caffe.berkeleyvision.org/install_apt.html | |
- Steps: | |
1. General dependencies: | |
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler | |
sudo apt-get install --no-install-recommends libboost-all-dev |