ninetoothed.Tensor.ravel#
- Tensor.ravel()#
Flattens the hierarchy of the tensor.
ravel()differs fromflatten(), 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 applyingravel(), the resulting tensor will have a single flattened level with a shape of(N, P, Q, C, R, S).- Returns:
The raveled tensor.