29 #ifndef LBANN_CALLBACKS_CALLBACK_PROGRESS_BAR_HPP_INCLUDED 30 #define LBANN_CALLBACKS_CALLBACK_PROGRESS_BAR_HPP_INCLUDED 35 #define LBANN_PBAR_MOVING_AVERAGE_LENGTH 10 36 #define LBANN_PBAR_WIDTH 20 63 std::string
name()
const override {
return "progress bar"; }
69 template <
class Archive>
96 std::unique_ptr<callback_base>
98 std::shared_ptr<lbann_summary>
const&);
103 #endif // LBANN_CALLBACKS_CALLBACK_PROGRESS_BAR_HPP_INCLUDED progress_bar & operator=(const progress_bar &)=default
virtual void on_epoch_begin(model *m)
Called at the beginning of each epoch.
friend class cereal::access
prints a progress bar during training
progress_bar(int batch_interval=1, int newline_interval=0)
progress_bar * copy() const override
void serialize(Archive &ar)
Store state to archive for checkpoint and restart.
Base class for callbacks during training/testing.
Abstract base class for neural network models.
void on_forward_prop_begin(model *m) override
Called when a model begins forward propagation.
std::array< double, LBANN_PBAR_MOVING_AVERAGE_LENGTH > m_moving_avg_time
std::string name() const override
Return this callback's name.
void on_epoch_begin(model *m) override
Called at the beginning of each epoch.
virtual void on_forward_prop_begin(model *m)
Called when a model begins forward propagation.
std::unique_ptr< callback_base > build_progress_bar_callback_from_pbuf(const google::protobuf::Message &, std::shared_ptr< lbann_summary > const &)
void write_specific_proto(lbann_data::Callback &proto) const final
int m_training_iterations