tf.keras.experimental.SequenceFeatures

A layer for sequence input.

All feature_columns must be sequence dense columns with the same sequence_length. The output of this method can be fed into sequence networks, such as RNN.

The output of this method is a 3D Tensor of shape [batch_size, T, D]. T is the maximum sequence length for this batch, which could differ from batch to batch.

If multiple feature_columns are given with Di num_elements each, their outputs are concatenated. So, the final Tensor has shape [batch_size, T, D0 + D1 + ... + Dn].

Example:

# Behavior of some cells or feature columns may depend on whether we are in
# training or inference mode, e.g