operator coverage. Here are two common operations that may be useful
to go over:


Binary arithmetic ops: Unifies names from inputs


Matrix multiplication ops: Contracts away dims


Explicit alignment by names
Use "align_as()" or "align_to()" to align tensor dimensions by name to
a specified ordering. This is useful for performing "broadcasting by
names".
# This function is agnostic to the dimension ordering of input,
   # as long as it has a C dimension somewhere.
   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(3, 3, 3, num_channels, names=('N', 'H', 'W', 'C'))
more_imgs = torch.rand(3, num_channels, 3, 3, names=('N', 'C', 'H', 'W'))
videos = torch.randn(3, num_channels, 3, 3, 3, names=('N', 'C', 'H', 'W', 'D')
scale_channels(imgs, scale)


