28 #ifndef LBANN_CALLBACKS_CALLBACK_ALTERNATE_UPDATES_HPP_INCLUDED 29 #define LBANN_CALLBACKS_CALLBACK_ALTERNATE_UPDATES_HPP_INCLUDED 48 std::vector<std::string> layers_2,
66 std::string
name()
const override {
return "alternate updates"; }
77 const google::protobuf::Message&,
78 std::shared_ptr<lbann_summary>
const&);
83 #endif // LBANN_CALLBACKS_CALLBACK_ALTERNATE_UPDATES_HPP_INCLUDED void setup(model *m) override
Called once to set up the callback on the model (after all layers are set up).
std::vector< std::string > m_layer_names_2
std::vector< Layer * > freeze_layers
std::string name() const override
Return this callback's name.
std::vector< std::string > m_layer_names_1
std::vector< Layer * > unfreeze_layers
Base class for callbacks during training/testing.
Abstract base class for neural network models.
void on_batch_begin(model *m) override
Called at the beginning of a (mini-)batch.
alternate_updates & operator=(const alternate_updates &)=default
std::unique_ptr< callback_base > build_alternate_updates_callback_from_pbuf(const google::protobuf::Message &, std::shared_ptr< lbann_summary > const &)
void write_specific_proto(lbann_data::Callback &proto) const final
Add callback specific data to prototext.
alternate_updates(std::vector< std::string > layers_1, std::vector< std::string > layers_2, int iters_1=1, int iters_2=1)
alternate_updates * copy() const override