29 #ifndef LBANN_CALLBACKS_CALLBACK_SAVE_TOPK_MODELS_HPP_INCLUDED 30 #define LBANN_CALLBACKS_CALLBACK_SAVE_TOPK_MODELS_HPP_INCLUDED 54 std::string metric_name,
55 bool ascending_ordering =
false)
68 std::string
name()
const override {
return "save_topk_models"; }
81 const google::protobuf::Message&,
82 std::shared_ptr<lbann_summary>
const&);
87 #endif // LBANN_CALLBACKS_CALLBACK_SAVE_TOPK_MODELS_HPP_INCLUDED
bool am_in_topk(model *m)
void on_test_end(model *m) override
Called immediately after the end of testing.
bool m_ascending_ordering
std::string name() const override
Return this callback's name.
save_topk_models & operator=(const save_topk_models &)=default
save_topk_models(std::string dir, int k, std::string metric_name, bool ascending_ordering=false)
Constructor.
save_topk_models * copy() const override
Save the top K models for, e.g., inference and other analysis.
Abstract base class for neural network models.
std::string m_metric_name
std::unique_ptr< callback_base > build_save_topk_models_callback_from_pbuf(const google::protobuf::Message &, std::shared_ptr< lbann_summary > const &)