class_docstr: Optimizer that implements the FTRL algorithm.
  
  This version has support for both online L2 (McMahan et al., 2013) and
  shrinkage-type L2, which is the addition of an L2 penalty
  to the loss function.
  
  References:
    Ad-click prediction:
      [McMahan et al., 2013](https://dl.acm.org/citation.cfm?id=2488200)
      ([pdf](https://dl.acm.org/ft_gateway.cfm?id=2488200&ftid=1388399&dwn=1&CFID=32233078&CFTOKEN=d60fe57a294c056a-CB75C374-F915-E7A6-1573FBBC7BF7D526))
code: def _resource_apply_dense(self, grad, var):
      accum = self.get_slot(var, "accum")
      linear = self.get_slot(var, "linear")
      if self._l2_shrinkage_regularization_strength <= 0.0:
          return gen_training_ops.resource_apply_ftrl(
              var.handle,
              accum.handle,
              linear.handle,
              grad,
              math_ops.cast(
                  self._learning_rate_tensor, var.dtype.base_dtype
              ),
              math_ops.cast(
                  self._l1_regularization_strength_tensor,
                  var.dtype.base_dtype,
              ),
              math_ops.cast(
                  self._adjusted_l2_regularization_strength_tensor,
                  var.dtype.base_dtype,
              ),
              math_ops.cast(
                  self._learning_rate_power_tensor, var.dtype.base_dtype
              ),
              use_locking=self._use_locking,
          )
      else:
          return gen_training_ops.resource_apply_ftrl_v2(
              var.handle,
              accum.handle,
              linear.handle,
              grad,
              math_ops.cast(
                  self._learning_rate_tensor, var.dtype.base_dtype
              ),
              math_ops.cast(
                  self._l1_regularization_strength_tensor,
                  var.dtype.base_dtype,
              ),
              math_ops.cast(
                  self._adjusted_l2_regularization_strength_tensor,
                  var.dtype.base_dtype,
              ),
              math_ops.cast(
                  self._l2_shrinkage_regularization_strength_tensor,
                  var.dtype.base_dtype,
              ),
              math_ops.cast(
                  self._learning_rate_power_tensor, var.dtype.base_dtype
              ),
              use_locking=self._use_locking,
          )
  
file_path: tensorflow/tensorflow/python/training/ftrl.py
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_training_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.training import optimizer
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 5 for calling the FtrlOptimizer obj's underlying member method code with example usage: obj._resource_apply_dense(grad, var) and returns: gen_training_ops, gen_training_ops