Learn R Programming

ggmlR (version 0.6.1)

optimizer_sgd: Create an SGD optimizer

Description

Create an SGD optimizer

Usage

optimizer_sgd(params, lr = 0.01, momentum = 0)

Value

An optimizer environment

Arguments

params

Named list of ag_param tensors

lr

Learning rate (default 0.01)

momentum

Momentum factor (default 0)

Examples

Run this code
# \donttest{
w <- ag_param(matrix(runif(4), 2, 2))
opt <- optimizer_sgd(list(w = w), lr = 0.01)
# }

Run the code above in your browser using DataLab