Okay, so here is a less memory efficient way to delete last n columns. I have only tested it on a 2-D tensor.
>>> def delete_last_n_columns(a, n):
...     n_rows = a.size()[0]
...     n_cols = a.size()[1]
...     assert(n<n_cols)
...     first_cols = n_cols - n
...     mask = torch.arange(0,first_cols)
...     b = torch.index_select(a,1,mask) # Retain first few columns; delete last_n columns
...     return b
... 
>>> a.size()
torch.Size([10, 536])
>>> b = delete_last_n_columns(a,512)
>>> b.size()
torch.Size([10, 24])