Optimizer

Optimizer

class tflibs.training.optimizer.Optimizer(learning_rate, var_scope, beta1, beta2, decay_policy='none', decay_params=None)[source]
apply_gradients(grads_and_vars, global_step=None)[source]
apply_tower_gradients(tower_grads, global_step=None)[source]

Returns average gradients.

Parameters:tower_grads (list) – A list of tuples containing gradients and corresponding variables.
Returns:Applying gradients operation
Return type:tf.Operation
compute_grad(loss)[source]

Computes gradients of trainable variables with regard to a loss given.

Parameters:loss (tf.Tensor) – A tf.Tensor of a loss.
Returns:A list of tuples containing gradients and corresponding variables.
Return type:list
static dying_decay(train_iters, decay_iters, decay_steps)[source]
static lambda_decay(lr_fn)[source]
static step_decay(train_iters, decay_steps, decay_rate)[source]
train_op(loss, global_step=None)[source]
var_list