class_docstr: Optimizer that implements COCOB Backprop Algorithm
  
      Reference:
          - [COntinuos COin Betting (COCOB) Backprop optimizer
  ](https://arxiv.org/abs/1705.07795)
code: def _resource_apply_dense(self, grad, handle, apply_state=None):
      gradients_sum = self.get_slot(handle, "gradients_sum")
      grad_norm_sum = self.get_slot(handle, "grad_norm_sum")
      tilde_w = self.get_slot(handle, "tilde_w")
      lr = self.get_slot(handle, "lr")
      reward = self.get_slot(handle, "reward")
  
      lr_update = tf.maximum(lr, tf.abs(grad))
      gradients_sum_update = gradients_sum + grad
      grad_norm_sum_update = grad_norm_sum + tf.abs(grad)
      reward_update = tf.maximum(reward - grad * tilde_w, 0)
  
      grad_max = tf.maximum(
          grad_norm_sum_update + lr_update, self._alpha * lr_update
      )
      rewards_lr_sum = reward_update + lr_update
      new_w = (
          -gradients_sum_update
          / (lr_update * (grad_max))
          * rewards_lr_sum
      )
  
      var_update = handle - tilde_w + new_w
      tilde_w_update = new_w
  
      gradients_sum_update_op = gradients_sum.assign(
          gradients_sum_update
      )
      grad_norm_sum_update_op = grad_norm_sum.assign(
          grad_norm_sum_update
      )
      var_update_op = handle.assign(var_update)
      tilde_w_update_op = tilde_w.assign(tilde_w_update)
      lr_update_op = lr.assign(lr_update)
      reward_update_op = reward.assign(reward_update)
  
      return tf.group(
          *[
              gradients_sum_update_op,
              var_update_op,
              grad_norm_sum_update_op,
              tilde_w_update_op,
              reward_update_op,
              lr_update_op,
          ]
      )
  
file_path: addons/tensorflow_addons/optimizers/cocob.py
imports: from typeguard import typechecked
  import tensorflow
  from tensorflow_addons.optimizers import KerasLegacyOptimizer
label_desc: Use image node_id 3 for calling the COCOB obj's underlying member method code with example usage: obj._resource_apply_dense(grad, handle, apply_state) and returns: tf