def backward(self, loss):
with mx.autograd.record():<EOL><INDENT>if isinstance(loss, (tuple, list)):<EOL><INDENT>ls = [l * self._scaler.loss_scale for l in loss]<EOL><DEDENT>else:<EOL><INDENT>ls = loss * self._scaler.loss_scale<EOL><DEDENT><DEDENT>mx.autograd.backward(ls)<EOL>
backward propagation with loss