I am working on a research project. I am exposing the SnapshotSolverState function to the python api so I can handle snapshots within my python code. I add " .def("save", &Solver<Dtype>::SnapshotSolverState)" to the CAFFE_ROOT/python/caffe/_caffe.cpp file. It works great, but I had to move the SnapshotSolverState function from protected to public in the CAFFE_ROOT/include/caffe/solvers.hpp file.
Why was it protected in the first place? I am looking for a "coding-practice" reason, hopefully beyond the simple responses. Of course, if the answer is simple then that's okay.
Examples of simple responses:
-> "It is good to protect functions."
-> "There was no need to expose the function to public"
Hopefully, there is a more complete answer than these.
Thank you.