Exposing solver callbacks to python #3020

Merged
merged 1 commit into from Jun 17, 2016

Conversation

Projects
None yet
6 participants
Contributor

philkr commented Sep 3, 2015

This PR exposes the solver callbacks to python. They can be added by calling solver.add_callback(on_start, on_gradient), where on_start and on_gradient are python functions.

+1

This is a great addition. Code is elegant. Please accept this pull request.

Contributor

seanbell commented Jun 17, 2016

@longjon @shelhamer thoughts?

Contributor

jeffdonahue commented Jun 17, 2016

Solver_addCallback should maybe be spelled Solver_add_callback for consistency with e.g. BlobVec_add_blob. Otherwise LGTM.

Contributor

jeffdonahue commented Jun 17, 2016

All LGTM now. Thanks @philkr!

@jeffdonahue jeffdonahue merged commit f28f5ae into BVLC:master Jun 17, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Contributor

kli-nlpr commented Jun 19, 2016

Any examples how to use this?

@fxbit fxbit added a commit to Yodigram/caffe that referenced this pull request Sep 1, 2016

@jeffdonahue @fxbit jeffdonahue + fxbit Merge pull request #3020 from philkr/python_solver_callback
Exposing solver callbacks to python
8d8cb04
Contributor

shaibagon commented Jan 16, 2017 edited

@kli-nlpr A simple and nice example can be found at this SO thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment