TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.ravel

tensorplay.functional.ravel(input) → Tensor[source]

Return a contiguous flattened tensor. A copy is made only if needed.

Parameters:

input (Tensor) – the input tensor.

Example:

>>> t = tensorplay.tensor([[[1, 2],
...                    [3, 4]],
...                   [[5, 6],
...                    [7, 8]]])
>>> tensorplay.ravel(t)
tensor([1, 2, 3, 4, 5, 6, 7, 8])

On this page

Ask DeepWiki