4 #include <torch/nn/module.h> 5 #include <torch/optim/optimizer.h> 6 #include <torch/types.h> 24 TORCH_ARG(
double, learning_rate);
25 TORCH_ARG(
double, momentum) = 0;
26 TORCH_ARG(
double, dampening) = 0;
27 TORCH_ARG(
double, weight_decay) = 0;
28 TORCH_ARG(
bool, nesterov) =
false;
33 template <
typename ParameterContainer>
34 explicit SGD(ParameterContainer&& parameters,
const SGDOptions& options)
35 :
Optimizer(std::forward<ParameterContainer>(parameters)),
45 std::vector<Tensor> momentum_buffers;
Optimizer that defines a required step() method that takes no arguments and produces no values...