message: Add code examples for the tf.keras.backend.get_value and tf.keras.backend.set_value symbols.
diff: @@ -3234,12 +3234,44 @@ def reverse(x, axes):
  # VALUE MANIPULATION
  +_VALUE_SET_CODE_STRING = """
  + >>> K = tf.keras.backend # Common keras convention
  + >>> v = K.variable(1.)
  +
  + >>> # reassign
  + >>> K.set_value(v, 2.)
  + >>> print(K.get_value(v))
  + 2.0
  +
  + >>> # increment
  + >>> K.set_value(v, K.get_value(v) + 1)
  + >>> print(K.get_value(v))
  + 3.0
  +
  + Variable semantics in TensorFlow 2 are eager execution friendly. The above
  + code is roughly equivalent to:
  +
  + >>> v = tf.Variable(1.)
  +
  + >>> _ = v.assign(2.)
  + >>> print(v.numpy())
  + 2.0
  +
  + >>> _ = v.assign_add(1.)
  + >>> print(v.numpy())
  + 3.0"""[3:] # Prune first newline and indent to match the docstring template.
  @keras_export('keras.backend.get_value')
  def get_value(x):
  """Returns the value of a variable.
  + `backend.get_value` is the compliment of `backend.set_value`, and provides
  + a generic interface for reading from variables while abstracting away the
  + differences between TensorFlow 1.x and 2.x semantics.
  +
  + {snippet}
  +
  Arguments:
  x: input variable.
  @@ -3291,8 +3323,14 @@ def batch_get_value(tensors):
  def set_value(x, value):
  """Sets the value of a variable, from a Numpy array.
  + `backend.set_value` is the compliment of `backend.get_value`, and provides
  + a generic interface for assigning to variables while abstracting away the
  + differences between TensorFlow 1.x and 2.x semantics.
  +
  + {snippet}
  +
  Arguments:
  - x: Tensor to set to a new value.
  + x: Variable to set to a new value.
  value: Value to set the tensor to, as a Numpy array
  (of the same shape).
  """
  @@ -3359,6 +3397,10 @@ def batch_set_value(tuples):
  get_session().run(assign_ops, feed_dict=feed_dict)
  +get_value.__doc__ = get_value.__doc__.format(snippet=_VALUE_SET_CODE_STRING)
  +set_value.__doc__ = set_value.__doc__.format(snippet=_VALUE_SET_CODE_STRING)
  +
  +
  @keras_export('keras.backend.print_tensor')
  def print_tensor(x, message=''):
  """Prints `message` and the tensor value when evaluated.
  