27 #ifndef LBANN_CALLBACKS_CALLBACK_CHECK_GRADIENTS_HPP_INCLUDED 28 #define LBANN_CALLBACKS_CALLBACK_CHECK_GRADIENTS_HPP_INCLUDED 32 #include <google/protobuf/message.h> 65 DataType step_size = DataType(0),
67 bool error_on_failure =
false);
69 std::string
name()
const override {
return "check gradients"; }
78 template <
class Archive>
101 std::unique_ptr<callback_base>
103 std::shared_ptr<lbann_summary>
const&);
108 #endif // LBANN_CALLBACKS_CALLBACK_CHECK_GRADIENTS_HPP_INCLUDED void on_validation_end(model *m) override
Called immediately after the end of validation.
check_gradients(std::set< execution_mode > modes={}, DataType step_size=DataType(0), bool verbose=false, bool error_on_failure=false)
std::string name() const override
Return this callback's name.
Gradient checking callback.
void write_specific_proto(lbann_data::Callback &proto) const final
void on_train_end(model *m) override
Called at the end of training.
Base class for callbacks during training/testing.
std::unique_ptr< callback_base > build_check_gradients_callback_from_pbuf(const google::protobuf::Message &, std::shared_ptr< lbann_summary > const &)
Abstract base class for neural network models.
void do_check_gradients(model &m) const
std::set< execution_mode > m_modes
void serialize(Archive &ar)
Store state to archive for checkpoint and restart.
check_gradients * copy() const override
void on_test_end(model *m) override
Called immediately after the end of testing.