Caffe
signal_handler.h
1 #ifndef INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_
2 #define INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_
3 
4 #include "caffe/proto/caffe.pb.h"
5 #include "caffe/solver.hpp"
6 
7 namespace caffe {
8 
9 class SignalHandler {
10  public:
11  // Contructor. Specify what action to take when a signal is received.
12  SignalHandler(SolverAction::Enum SIGINT_action,
13  SolverAction::Enum SIGHUP_action);
14  ~SignalHandler();
15  ActionCallback GetActionFunction();
16  private:
17  SolverAction::Enum CheckForSignals() const;
18  SolverAction::Enum SIGINT_action_;
19  SolverAction::Enum SIGHUP_action_;
20 };
21 
22 } // namespace caffe
23 
24 #endif // INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
Definition: signal_handler.h:9
boost::function< SolverAction::Enum()> ActionCallback
Type of a function that returns a Solver Action enumeration.
Definition: solver.hpp:33