Well, in my example you could just save the last two dims and then expand those.  I’m not totally sure what you find wrong with my answer?  It’s a bit confusing because you are using a function that doesn’t actually exist and you never save the original tensor T.  I think your example should look like this:
original_tensor = torch.randn(u,v,w,x,y,z)
T = original_tensor.view_last(y*z)
U = original_tensor.view_last(y,z)
# my suggestion
rem_dims, last_2_dims = original_tensor.size()[:-2], original_tensor.size()[-2:]
T = original_tensor.view(*rem_dims, -1)
U = T.view(*rem_dims, *last_2_dims)

Alternative Answer
Named Tensors and specifically this 18