Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfq.padded_to_ragged

View source on GitHub

Utility tf.function that converts a padded tensor to ragged.

tfq.padded_to_ragged(
    masked_state
)

Convert a state tf.Tensor padded with the value -2 to a tf.RaggedTensor using efficient boolean masking.

Args:

  • masked_state: tf.State tensor with -2 padding.

Returns: