8 #ifndef BLACKCATTENSORS_NEURALNETWORKS_OPTIMIZERS_MOMENTUM_H_ 9 #define BLACKCATTENSORS_NEURALNETWORKS_OPTIMIZERS_MOMENTUM_H_ 18 template<
class Tensor>
28 template<
class... Args>
30 momentum(std::
forward<Args>(args)...) {
34 template<
class TensorX,
class Gradients>
35 void update(TensorX& tensor, Gradients&& delta)
void load(Layer_Loader &loader, std::string name)
Definition: momentum.h:49
self_type & zero()
Definition: tensor_base.h:13
value_type learning_rate
Definition: momentum.h:24
void save(Layer_Loader &loader, std::string name) const
Definition: momentum.h:45
Definition: layer_loader.h:19
void save_variable(const T &tensor, string variable_name)
Definition: layer_loader.h:44
void set_learning_rate(value_type lr)
Definition: momentum.h:41
typename parent_type::value_type value_type
Definition: tensor_base.h:41
Optimizer(Args &&... args)
Definition: momentum.h:29
Definition: momentum.h:19
Definition: optimizer_base.h:16
void update(TensorX &tensor, Gradients &&delta)
Definition: momentum.h:35
typename Tensor::value_type value_type
Definition: momentum.h:21
value_type alpha
Definition: momentum.h:23
void load_variable(T &tensor, string variable_name)
Definition: layer_loader.h:50
Tensor momentum
Definition: momentum.h:26
Definition: momentum.h:16
The Evaluator determines if an expression needs to be greedily optimized.
Definition: algorithms.h:22