SGD

class ivy.neural_net_stateful.optimizers.SGD(lr=<function SGD.<lambda>>, compile_step=False)[source]

Bases: ivy.neural_net_stateful.optimizers.Optimizer

__init__(lr=<function SGD.<lambda>>, compile_step=False)[source]

Construct a Stochastic-Gradient-Descent (SGD) optimizer.

Parameters
  • lr (float, optional) – Learning rate, default is 1e-4.

  • compile_step (bool, option) – Whether to compile the optimizer step, default is False.

set_state(state)[source]

Set state of the optimizer.

Parameters

state (Ivy container of state tensors) – Nested state to update.

property state

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty