


def scale_channels(input, scale):
         >>>    scale = scale.refine_names('C')
         >>>    return input * scale.align_as(input)



     >>> num_channels = 3
     >>> scale = torch.randn(num_channels, names=('C',))
     >>> imgs = torch.rand(32, 128, 128, num_channels, names=('N', 'H', 'W', 'C'))
     >>> more_imgs = torch.rand(32, num_channels, 128, 128, names=('N', 'C', 'H', 'W'))
     >>> videos = torch.randn(3, num_channels, 128, 128, 128, names=('N', 'C', 'H', 'W', 'D'))

     # scale_channels is agnostic to the dimension order of the input
     >>> scale_channels(imgs, scale)
     >>> scale_channels(more_imgs, scale)
     >>> scale_channels(videos, scale)

  Warning:

    The named tensor API is experimental and subject to change.

align_to(*names)
  Permutes the dimensions of the "self" tensor to match the order
  specified in "names", adding size-one dims for any new names.
