


named_tensor = tensor.refine_names('A', 'B', 'C', 'D', 'E', 'F')



     # Move the F and E dims to the front while keeping the rest in order
     >>> named_tensor.align_to('F', 'E', ...)

  Warning:

    The named tensor API is experimental and subject to change.

flatten(dims, out_dim) -> Tensor
  Flattens "dims" into a single dimension with name "out_dim".

  All of *dims* must be consecutive in order in the "self" tensor,
  but not necessary contiguous in memory.

  Examples:

     >>> imgs = torch.randn(32, 3, 128, 128, names=('N', 'C', 'H', 'W'))
     >>> flat_imgs = imgs.flatten(['C', 'H', 'W'], 'features')
     >>> flat_imgs.names, flat_imgs.shape
     (('N', 'features'), torch.Size([32, 49152]))

  Warning:

    The named tensor API is experimental and subject to change.
