I'm trying to figure out how to split my tensor of sequential data into multiple parts based on partitioning continuous masks with value of binary number '1'.
I've read the official documentation. Howerver I can't find any function that can handle this easy. Any helpful ways for this in python?
I have tried with 'tf.ragged.boolean_mask' but it doesn't seem to fit in my case.
The visualized example of my explanation is:
inputs:
# both are tensors, NOT data.
data_tensor = ([3,5,6,2,6,1,3,9,5])
mask_tensor = ([0,1,1,1,0,0,1,1,0])
expected output:
output_tensor = ([[3],[5,6,2],[6,1],[3,9],[5]])
Thank you.