tfm.vision.preprocess_ops_3d.sample_linspace_sequence

Samples num_windows segments from sequence with linearly spaced offsets.

The samples are concatenated in a single tf.Tensor in order to have the same format structure per timestep (e.g. a single frame). If num_steps * stride is bigger than the number of timesteps, the sequence is repeated. This function can be used in evaluation in order to extract enough segments to span the entire sequence.

sequence Any tensor where the first dimension is timesteps.
num_windows Number of windows retrieved from the sequence.
num_steps Number of steps (e.g. frames) to take.
stride Distance to sample between timesteps.

A single tf.Tensor with first dimension num_windows * num_steps. The tensor contains the concatenated list of num_windows tensors which offsets have been linearly spaced from input.