Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sgd_step

Sgd_step


Description

Sgd_step

Usage

sgd_step(p, lr, ...)

Arguments

p

p

lr

learning rate

...

additional arguments to pass

Value

None

Examples

## Not run: 

tst_param = function(val, grad = NULL) {
  "Create a tensor with `val` and a gradient of `grad` for testing"
  res = tensor(val) %>% float()

  if(is.null(grad)) {
    grad = tensor(val / 10)
  } else {
    grad = tensor(grad)
  }

  res$grad = grad %>% float()
  res
}
p = tst_param(1., 0.1)
sgd_step(p, 1.)


## End(Not run)

fastai

Interface to 'fastai'

v2.0.7
Apache License 2.0
Authors
Turgut Abdullayev [ctb, cre, cph, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.