signal_handler.h
#ifndef INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_
#define INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_
#include "caffe/proto/caffe.pb.h"
#include "caffe/solver.hpp"
namespace caffe {
class SignalHandler {
public:
// Constructor. Specify what action to take when a signal is received.
SignalHandler(SolverAction::Enum SIGINT_action,
SolverAction::Enum SIGHUP_action);
~SignalHandler();
ActionCallback GetActionFunction();
private:
SolverAction::Enum CheckForSignals() const;
SolverAction::Enum SIGINT_action_;
SolverAction::Enum SIGHUP_action_;
};
} // namespace caffe
#endif // INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_
caffe::SignalHandler
Definition: signal_handler.h:9
caffe
A layer factory that allows one to register layers. During runtime, registered layers can be called b...
Definition: blob.hpp:14
caffe::ActionCallback
boost::function< SolverAction::Enum()> ActionCallback
Type of a function that returns a Solver Action enumeration.
Definition: solver.hpp:33