diff --git a/python/caffe/_caffe.cpp b/python/caffe/_caffe.cpp index f03dae3dce6..156b5187d58 100644 --- a/python/caffe/_caffe.cpp +++ b/python/caffe/_caffe.cpp @@ -197,7 +197,8 @@ BOOST_PYTHON_MODULE(_caffe) { .add_property("test_nets", &PySGDSolver::test_nets) .add_property("iter", &PySGDSolver::iter) .def("solve", &PySGDSolver::Solve) - .def("solve", &PySGDSolver::SolveResume); + .def("solve", &PySGDSolver::SolveResume) + .def("step", &PySGDSolver::Step); bp::class_ > >("NetVec") .def(bp::vector_indexing_suite >, true>()); diff --git a/python/caffe/_caffe.hpp b/python/caffe/_caffe.hpp index bf1b7d168f8..a5cef74ad66 100644 --- a/python/caffe/_caffe.hpp +++ b/python/caffe/_caffe.hpp @@ -181,6 +181,7 @@ class PySGDSolver { vector > test_nets() { return test_nets_; } int iter() { return solver_->iter(); } void Solve() { return solver_->Solve(); } + void Step(int iters) { solver_->Step(iters); } void SolveResume(const string& resume_file); protected: