In Lua/Torch, I would do this:
input[{{}, {1, -2}, {1, -2}}]

But I can’t seem how to recreate in it in PyTorch.
I’ve tried different variations of brackets, like: input[((), (1, -2), (1, -2))]), but I keep getting the error:
IndexError: The advanced indexing objects could not be broadcast

input has a size of: (3L, 384L, 512L)
Edit:
I think this works:
input[:, (1, -2), (1, -2)]