torch.ravel torch.ravel(input) → Tensor Return a contiguous flattened tensor. A copy is made only if needed. Parameters: input (Tensor) – the input tensor. Example: