c ++ python tune of caffe achieve

Morning listening to people discuss python tone c ++, the first reaction is how to achieve caffe, he looked at home in the evening.

In fact, as long as the file location to find enough specific implementation, in python / caffe / _caffe.cpp, the line 42 has a less conspicuous definition:

namespace bp = boost::python;

So caffe is the use of calling boost python extensions implemented

By the way, incomplete investigation under python tone c ++ method:

ctypes - difference platform compatibility, reference [2]

cython - performance decreased by 20%, reference [1]

swig - 70% performance degradation, reference [1]

boost:python

Reference [1] and [2 ], and varying degrees of Cython swig will lead to a decline c ++ performance, ctypes platform compatibility is poor, anyway, I did not realize before, hearsay.

Further, where a relatively concise cython swig and code examples.

Guess you like

Origin www.cnblogs.com/zhengmeisong/p/11415843.html