29 #ifndef LBANN_CALLBACKS_CALLBACK_DUMP_GRADIENTS_HPP_INCLUDED 30 #define LBANN_CALLBACKS_CALLBACK_DUMP_GRADIENTS_HPP_INCLUDED 64 std::string
name()
const override {
return "dump gradients"; }
70 template <
class Archive>
87 std::unique_ptr<callback_base>
89 std::shared_ptr<lbann_summary>
const&);
94 #endif // LBANN_CALLBACKS_CALLBACK_DUMP_GRADIENTS_HPP_INCLUDED void write_specific_proto(lbann_data::Callback &proto) const final
friend class cereal::access
dump_gradients * copy() const override
void on_backward_prop_end(model *m) override
Called when a model ends backward propagation.
Dump gradient matrices to files.
dump_gradients(std::string basename, int batch_interval=1)
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.
dump_gradients & operator=(const dump_gradients &)=default
virtual void on_backward_prop_end(model *m)
Called when a model ends backward propagation.
std::string m_basename
Basename for writing files.
std::unique_ptr< callback_base > build_dump_gradients_callback_from_pbuf(const google::protobuf::Message &, std::shared_ptr< lbann_summary > const &)
std::string name() const override
Return this callback's name.