% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autograd.R
\name{optimizer_sgd}
\alias{optimizer_sgd}
\title{Create an SGD optimizer}
\usage{
optimizer_sgd(params, lr = 0.01, momentum = 0)
}
\arguments{
\item{params}{Named list of ag_param tensors}

\item{lr}{Learning rate (default 0.01)}

\item{momentum}{Momentum factor (default 0)}
}
\value{
An optimizer environment
}
\description{
Create an SGD optimizer
}
\examples{
\donttest{
w <- ag_param(matrix(runif(4), 2, 2))
opt <- optimizer_sgd(list(w = w), lr = 0.01)
}
}
