ninetoothed.Tensor.ravel#

Tensor.ravel()#

Flattens the hierarchy of the tensor.

ravel() differs from flatten(), which only flattens dimensions at a single level. For example, consider a tensor with two levels: the first level has a shape of (N, P, Q), and the second level has a shape of (C, R, S). After applying ravel(), the resulting tensor will have a single flattened level with a shape of (N, P, Q, C, R, S).

Returns:

The raveled tensor.