'Updates parameters according to the installed optimizer and the gradients computed
in the previous forward-backward batch.
See Also
:meth:`BaseModule.update`.'

def update(self):

    assert (self.binded and self.params_initialized and self.optimizer_initialized)
    self._params_dirty = True
    if self._update_on_kvstore:
        _update_params_on_kvstore(self._exec_group.param_arrays, self._exec_group.grad_arrays, self._kvstore, self._exec_group.param_names)
    else:
        _update_params(self._exec_group.param_arrays, self._exec_group.grad_arrays, updater=self._updater, num_device=len(self._context), kvstore=self._kvstore, param_names=self._exec_group.param_names)
