Skip to content

Instantly share code, notes, and snippets.

@TobeyQin
TobeyQin / build_caffe2_for_python3_win
Created September 10, 2018 09:36
build caffe2 wheel package for python3 on windows
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
@TobeyQin
TobeyQin / build_pycaffe_wheel_for_linux_cpu_py3
Last active November 16, 2018 20:34
Build PyCaffe wheel package for python3.5
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
@TobeyQin
TobeyQin / build_pycaffe_wheel_for_linux_cpu_py2
Last active September 10, 2018 09:30
Build PyCaffe Wheel Package
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