// - A named dim can only be refined to have the same name.
print(imgs.names)
print(imgs.refine_names("N", "C", "H", "W").names)
// Coerces the last two dims to "H" and "W". In Python 2, use the string "..." instead of ...
print(imgs.refine_names(..., "H", "W").names)
After Change
// - A named dim can only be refined to have the same name.
imgs = torch.randn(3, 1, 1, 2)
named_imgs= imgs.refine_names("N", "C", "H", "W")print(named_imgs.names)
// Coerces the last two dims to "H" and "W". In Python 2, use the string "..." instead of ...
print(imgs.refine_names(..., "H", "W").names)