Table Of Contents
Table Of Contents

backward

mxnet.autograd.backward(heads, head_grads=None, retain_graph=False, train_mode=True)[source]

Compute the gradients of heads w.r.t previously marked variables.

Parameters:
  • heads (NDArray or list of NDArray) – Output NDArray(s)
  • head_grads (NDArray or list of NDArray or None) – Gradients with respect to heads.
  • train_mode (bool, optional) – Whether to do backward for training or predicting.