def _preprocessing_fn(inputs):
  """Preprocess input columns into transformed columns.

  Args:
    inputs: Input Tensors.

  Returns:
   Dictionary of respective transformed inputs

  Example:
    `int_features`: tft.scale_to_0_1(...)
      Input:    [[[0]],   [[1]], [[2]]]
      Output:   [[[0]], [[0.5]], [[1]]]

    `float_features`: tft.scale_to_0_1(.., elementwise = True)
      Input:  [
          [[1.0, 2.0, 3.0, 4.0]],
          [[2.0, 3.0, 4.0, 5.0]],
          [[3.0, 4.0, 0.0, 0.0]]
      ]
      Output: [
          [[0.0, 0.0, 0.75, 0.8]],
          [[0.5, 0.5,  1.0, 1.0]],
          [[1.0, 1.0,  0.0, 0.0]]
      ]

    `seq_int_feature`: tft.scale_by_min_max(...)
      Input: [
          [ [1, 2],   [3, 4]],
          [ [5, 6],   [7, 8]],
          [[9, 10], [11, 12]]
      ]
      Output: [
          [[   0.0, 0.0909], [0.1818, 0.2727]],
          [[0.3636, 0.4545], [0.5454, 0.6363]],
          [[0.7272, 0.8181], [0.9090,    1.0]]
      ]

    `seq_string_feature`: tft.compute_and_apply_vocabulary(...)
      Input: [
          [[ b'Hello', b'World'], []],
          [[   b'foo',   b'bar'], []],
          [[b'tensor',  b'flow'], []]
      ]
      Output: [
          [[[5, 4], []]],
          [[[1, 3], []]],
          [[[0, 2], []]]
      ]
  """
  return {
      'transformed_seq_int_feature':
          tft.scale_by_min_max(inputs['seq_int_feature']),
      'transformed_seq_string_feature':
          tft.compute_and_apply_vocabulary(inputs['seq_string_feature']),
      'transformed_float_feature':
          tft.scale_to_0_1(inputs['float_feature'], elementwise=True),
      'transformed_int_feature':
          tft.scale_to_0_1(inputs['int_feature']),
  }
Preprocess input columns into transformed columns.

  Args:
    inputs: Input Tensors.

  Returns:
   Dictionary of respective transformed inputs

  Example:
    `int_features`: tft.scale_to_0_1(...)
      Input:    [[[0]],   [[1]], [[2]]]
      Output:   [[[0]], [[0.5]], [[1]]]

    `float_features`: tft.scale_to_0_1(.., elementwise = True)
      Input:  [
          [[1.0, 2.0, 3.0, 4.0]],
          [[2.0, 3.0, 4.0, 5.0]],
          [[3.0, 4.0, 0.0, 0.0]]
      ]
      Output: [
          [[0.0, 0.0, 0.75, 0.8]],
          [[0.5, 0.5,  1.0, 1.0]],
          [[1.0, 1.0,  0.0, 0.0]]
      ]

    `seq_int_feature`: tft.scale_by_min_max(...)
      Input: [
          [ [1, 2],   [3, 4]],
          [ [5, 6],   [7, 8]],
          [[9, 10], [11, 12]]
      ]
      Output: [
          [[   0.0, 0.0909], [0.1818, 0.2727]],
          [[0.3636, 0.4545], [0.5454, 0.6363]],
          [[0.7272, 0.8181], [0.9090,    1.0]]
      ]

    `seq_string_feature`: tft.compute_and_apply_vocabulary(...)
      Input: [
          [[ b'Hello', b'World'], []],
          [[   b'foo',   b'bar'], []],
          [[b'tensor',  b'flow'], []]
      ]
      Output: [
          [[[5, 4], []]],
          [[[1, 3], []]],
          [[[0, 2], []]]
      ]
  
examples/simple_sequence_example.py