29 #ifndef LBANN_CALLBACKS_CALLBACK_DUMP_WEIGHTS_HPP_INCLUDED 30 #define LBANN_CALLBACKS_CALLBACK_DUMP_WEIGHTS_HPP_INCLUDED 41 namespace dump_weights_internal {
65 El::Int epoch_interval,
66 std::unique_ptr<dump_weights_internal::FileFormat> file_format);
70 void on_train_begin(
model* m)
override;
71 void on_epoch_end(
model* m)
override;
72 std::string
name()
const override {
return "dump weights"; }
80 template <
class Archive>
87 void write_specific_proto(lbann_data::Callback& proto)
const final;
89 friend class cereal::access;
104 std::unique_ptr<callback_base>
106 std::shared_ptr<lbann_summary>
const&);
111 #endif // LBANN_CALLBACKS_CALLBACK_DUMP_WEIGHTS_HPP_INCLUDED std::string name() const override
Return this callback's name.
std::string m_directory
Basename for writing files.
void serialize(std::ostream &os, google::protobuf::Message const &msg)
Serialize the protobuf message to a stream.
std::unique_ptr< dump_weights_internal::FileFormat > m_file_format
Weight file format.
const std::string & get_target_dir()
El::Int m_epoch_interval
Interval at which to dump weights.
Base class for callbacks during training/testing.
Abstract base class for neural network models.
dump_weights * copy() const override
void set_target_dir(const std::string &dir)
visitor_hook
Neural network execution mode.
std::unique_ptr< callback_base > build_dump_weights_callback_from_pbuf(const google::protobuf::Message &, std::shared_ptr< lbann_summary > const &)