47 double const*
const error,
48 std::size_t
const size = 1) = 0;
59 double const*
const jacobian,
60 std::size_t
const columns = 1) = 0;
70 virtual std::string
status(std::size_t epoch)
const = 0;
80 virtual std::vector<std::string>
info()
const = 0;
86 std::string
const&
prefix =
"upd");
95 std::map<std::string, Stopwatch>
getTiming()
const;
114 std::map<std::string, Stopwatch>
sw;
Base class for different weight update methods.
Updater(std::size_t const sizeState)
Constructor.
virtual std::map< std::string, Stopwatch > getTiming() const
Return timings gathered in stopwatch map.
std::string prefix
Prefix for timing stopwatches.
virtual void resetTimingLoop()
Start a new timing loop (e.g.
virtual std::string status(std::size_t epoch) const =0
Status report.
virtual void setState(double *state)=0
Set pointer to current state.
std::size_t sizeState
Number of neural network connections (weights + biases).
bool timingReset
Internal loop timer reset switch.
virtual std::vector< std::string > statusHeader() const =0
Header for status report file.
virtual void setError(double const *const error, std::size_t const size=1)=0
Set pointer to current error vector.
bool timing
Whether detailed timing is enabled.
virtual std::vector< std::string > info() const =0
Information about this updater.
virtual void setupTiming(std::string const &prefix="upd")
Activate detailed timing.
virtual void setJacobian(double const *const jacobian, std::size_t const columns=1)=0
Set pointer to current Jacobi matrix.
virtual void update()=0
Perform single update of state vector.
std::map< std::string, Stopwatch > sw
Stopwatch map for timing.