27 #ifndef LBANN_OPTIMIZERS_ADAGRAD_HPP_INCLUDED 28 #define LBANN_OPTIMIZERS_ADAGRAD_HPP_INCLUDED 32 #include "lbann/proto/optimizers.pb.h" 44 template <
typename TensorDataType>
46 data_type_optimizer<TensorDataType>>
67 adagrad(TensorDataType learning_rate, TensorDataType eps = 1e-8);
73 template <
class Archive>
77 std::string
get_type()
const override {
return "AdaGrad"; }
85 void write_proto(lbann_data::Optimizer& opt)
const final;
88 friend cereal::access;
110 #ifdef LBANN_HAS_DNN_LIB 114 #endif // LBANN_HAS_DNN_LIB 117 template <
typename TensorDataType>
118 std::unique_ptr<optimizer>
123 #endif // LBANN_OPTIMIZERS_ADAGRAD_HPP_INCLUDED
Inject polymorphic clone functions into hierarchies.
std::unique_ptr< optimizer > build_adagrad_optimizer_from_pbuf(google::protobuf::Message const &)
void setup(weights *w) override
Must be called before training.
void step_compute(AbsDistMatrixType &values, const AbsDistMatrixType &gradient) override
Generates nicely formatted description messages.
description get_description() const override
std::string get_type() const override
adagrad()
Default constructor.
El::AbstractDistMatrix< TensorDataType > AbsDistMatrixType
The tensor type expected in this object.
void setup(WeightsType *w=nullptr) override
std::unique_ptr< AbsDistMatrixType > m_cache
void step_compute_cpu(AbsDistMatrixType &values, const AbsDistMatrixType &gradient)
adagrad & operator=(const adagrad &other)
~adagrad() override=default
void serialize(Archive &ar)
void write_proto(lbann_data::Optimizer &opt) const final