Remove all size-1 dimensions from tensor x.
Input
tensor([[[[1.]],
[[1.]],
[[1.]],
[[1.]],
[[1.]],
[[1.]],
[[1.]],
[[1.]],
[[1.]]]])
Output
tensor([1., 1., 1., 1., 1., 1., 1., 1., 1.])