Optimizer

class dragon.vm.tensorflow.keras.optimizers.Optimizer(
  name=None,
  **kwargs
)[source]

The base class for optimizers.

__init__

Optimizer.__init__(
  name=None,
  **kwargs
)[source]

Create a Optimizer.

Parameters:
  • name (str, optional) – The optional optimizer name.

Properties

iterations

Optimizer.iterations

Return the number of steps has run.

Returns:
int – The iterations.

Methods

apply_gradients

Optimizer.apply_gradients(grads_and_vars)[source]

Apply the gradients to update variables.

Parameters:
  • grads_and_vars (Sequence[Sequence[dragon.Tensor]]) – The gradients and variables.
Returns:

dragon.vm.tensorflow.keras.optimizers.Optimizer – The self to generate the update operations.