## Get final values from an specific dimension/axis of an arbitrarily dimensioned PyTorch Tensor

Get final values from an specific dimension/axis of an arbitrarily dimensioned PyTorch Tensor Question: Suppose I had a PyTorch tensor such as: import torch x = torch.randn([3, 4, 5]) and I wanted to get a new tensor, with the same number of dimensions, containing everything from the final value of dimension 1. I could just …