ivy.gradient_descent_update(ws, dcdws, lr, f=None)[source]

Update weights ws of some function, given the derivatives of some cost c with respect to ws, [dc/dw for w in ws].

  • ws (Ivy container) – Weights of the function to be updated.

  • dcdws (Ivy container) – Derivates of the cost c with respect to the weights ws, [dc/dw for w in ws].

  • lr (float) – Learning rate, the rate at which the weights should be updated relative to the gradient.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


The new function weights ws_new, following the gradient descent updates.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty