pycaffe: store a shared_ptr<CaffeNet> in SGDSolver
authorJonathan L Long <jonlong@cs.berkeley.edu>
Fri, 25 Apr 2014 21:29:50 +0000 (14:29 -0700)
committerJonathan L Long <jonlong@cs.berkeley.edu>
Fri, 2 May 2014 20:25:51 +0000 (13:25 -0700)
commite1072a66d467b743df75435e1a28a1e34a1a4f25
tree2f007357adb7a689b108805eeb553106a2441362
parent634a382bce186e63671d37b4d8e40939a74b6373
pycaffe: store a shared_ptr<CaffeNet> in SGDSolver

Doing this, rather than constructing the CaffeNet wrapper every time,
will allow the wrapper to hold references that last at least as long as
SGDSolver (which will be necessary to ensure that data used by
MemoryDataLayer doesn't get freed).
python/caffe/_caffe.cpp