<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/ops/preprocess_ops_3d.py#L38-L75) |

Samples `num_windows` segments from sequence with linearly spaced offsets.

    tfm.vision.preprocess_ops_3d.sample_linspace_sequence(
        sequence: tf.Tensor, num_windows: int, num_steps: int, stride: int
    ) -> tf.Tensor

The samples are concatenated in a single [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/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.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `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. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A single [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/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. ||

<br />