Skip to Content

sgd

View the code on GitHub

Structs

Struct: SGD

Fields

  • params: List[Array]

  • lr: SIMD[float32, 1]

  • momentum: SIMD[float32, 1]

  • weight_decay: SIMD[float32, 1]

  • velocity: List[Array]

Methods

__init__(out self, params: List[Array], lr: SIMD[float32, 1] = SIMD(#kgen.float_literal<1|100>), momentum: SIMD[float32, 1] = SIMD(0), weight_decay: SIMD[float32, 1] = SIMD(0))
more details
Args
  • self: Self

  • params: List[Array]

  • lr: SIMD[float32, 1] (default: SIMD(#kgen.float_literal<1|100>))

  • momentum: SIMD[float32, 1] (default: SIMD(0))

  • weight_decay: SIMD[float32, 1] (default: SIMD(0))

step(mut self)
more details
Args
  • self: Self

Functions

Last updated on