|TensorFlow 1 version||View source on GitHub|
A layer for sequence input.
Compat aliases for migration
See Migration guide for more details.
tf.keras.experimental.SequenceFeatures( feature_columns, trainable=True, name=None, **kwargs )
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.
feature_columns are given with
num_elements each, their
outputs are concatenated. So, the final
Tensor has shape
[batch_size, T, D0 + D1 + ... + Dn].
# Behavior of some cells or feature columns may depend on whether we are in # training or inference mode, e.g