class_docstr: Layer that makes padding and masking a Composite Tensors effortless.
  
  The layer takes a RaggedTensor or a SparseTensor and converts it to a uniform
  tensor by right-padding it or filling in missing values.
  
  Example:
  
  ```python
  x = tf.keras.layers.Input(shape=(None, None), ragged=True)
  y = tf_text.keras.layers.ToDense(mask=True)(x)
  model = tf.keras.Model(x, y)
  
  rt = tf.RaggedTensor.from_nested_row_splits(
    flat_values=[10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
    nested_row_splits=([0, 1, 1, 5], [0, 3, 3, 5, 9, 10]))
  model.predict(rt)
  
  [[[10, 11, 12,  0], [ 0,  0,  0,  0], [ 0,  0,  0,  0], [ 0,  0,  0,  0]],
   [[ 0,  0,  0,  0], [ 0,  0,  0,  0], [ 0,  0,  0,  0], [ 0,  0,  0,  0]],
   [[ 0,  0,  0,  0], [13, 14,  0,  0], [15, 16, 17, 18], [19,  0,  0,  0]]]
  ```
  
  Args:
    pad_value: A value used to pad and fill in the missing values. Should be a
      meaningless value for the input data. Default is '0'.
    mask: A Boolean value representing whether to mask the padded values. If
      true, no any downstream Masking layer or Embedding layer with
      mask_zero=True should be added. Default is 'False'.
    shape: If not `None`, the resulting dense tensor will be guaranteed to have
      this shape. For RaggedTensor inputs, this is passed to `tf.RaggedTensor`'s
      `to_tensor` method. For other tensor types, a `tf.ensure_shape` call is
      added to assert that the output has this shape.
    **kwargs: kwargs of parent class.
  Input shape: Any Ragged or Sparse Tensor is accepted, but it requires the type
    of input to be specified via the Input or InputLayer from the Keras API.
  Output shape: The output is a uniform tensor having the same shape, in case of
    a ragged input or the same dense shape, in case of a sparse input.
code: def __init__(self, pad_value=0, mask=False, shape=None, **kwargs):
      super(ToDense, self).__init__(**kwargs)
  
      self._pad_value = pad_value
      self._mask = mask
      self._shape = shape
      self._compute_output_and_mask_jointly = True
      self._supports_ragged_inputs = True
      self.trainable = False
      self.masking_layer = tf.keras.layers.Masking(
          mask_value=self._pad_value
      )
  
file_path: text/tensorflow_text/python/keras/layers/todense.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
label_desc: Use image node_id 1 to create a new ToDense object from inherited base classes: tf.keras.layers with example: obj = ToDense(pad_value, mask, shape)