strides_of¶
- torch_sim.transforms.strides_of(v)[source]¶
Calculate the cumulative strides of a flattened tensor.
This function computes the cumulative sum of the input tensor v after flattening it. The resulting tensor contains the cumulative strides, which can be useful for indexing or iterating over elements in a flattened representation.