Caffe
|
An interface for classes that perform optimization on Nets. More...
#include <solver.hpp>
Classes | |
class | Callback |
Public Member Functions | |
Solver (const SolverParameter ¶m) | |
Solver (const string ¶m_file) | |
void | Init (const SolverParameter ¶m) |
void | InitTrainNet () |
void | InitTestNets () |
void | SetActionFunction (ActionCallback func) |
SolverAction::Enum | GetRequestedAction () |
virtual void | Solve (const char *resume_file=NULL) |
void | Solve (const string resume_file) |
void | Step (int iters) |
void | Restore (const char *resume_file) |
void | Snapshot () |
const SolverParameter & | param () const |
shared_ptr< Net< Dtype > > | net () |
const vector< shared_ptr< Net< Dtype > > > & | test_nets () |
int | iter () const |
const vector< Callback * > & | callbacks () const |
void | add_callback (Callback *value) |
void | CheckSnapshotWritePermissions () |
virtual const char * | type () const |
Returns the solver type. | |
Protected Member Functions | |
virtual void | ApplyUpdate ()=0 |
string | SnapshotFilename (const string extension) |
string | SnapshotToBinaryProto () |
string | SnapshotToHDF5 () |
void | TestAll () |
void | Test (const int test_net_id=0) |
virtual void | SnapshotSolverState (const string &model_filename)=0 |
virtual void | RestoreSolverStateFromHDF5 (const string &state_file)=0 |
virtual void | RestoreSolverStateFromBinaryProto (const string &state_file)=0 |
void | DisplayOutputBlobs (const int net_id) |
void | UpdateSmoothedLoss (Dtype loss, int start_iter, int average_loss) |
DISABLE_COPY_AND_ASSIGN (Solver) | |
Protected Attributes | |
SolverParameter | param_ |
int | iter_ |
int | current_step_ |
shared_ptr< Net< Dtype > > | net_ |
vector< shared_ptr< Net< Dtype > > > | test_nets_ |
vector< Callback * > | callbacks_ |
vector< Dtype > | losses_ |
Dtype | smoothed_loss_ |
ActionCallback | action_request_function_ |
bool | requested_early_exit_ |
Timer | iteration_timer_ |
float | iterations_last_ |
An interface for classes that perform optimization on Nets.
Requires implementation of ApplyUpdate to compute a parameter update given the current state of the Net parameters.