How do I remove elements from a 3D tensor with PyTorch?
I have a tensor with shape torch.Size([4, 161, 325]). How do I remove the first element along dim=2 so that the resulting tensor has a shape of torch.Size([4, 161, 324])?

You can use simple slicing,

&gt;&gt;&gt;a = torch.randn(4, 161, 325)
&gt;&gt;&gt;b = a[:, :, 1:]
&gt;&gt;&gt;b.shape
torch.Size([4, 161, 324])

