Dear ptrblck,
thanks a lot for your help! I think you are nearly there, however this is not yet what I need:
With your method, points has the shape of (batch_size, c, nb_points, nb_points)
What I want is a resulting tensor of shape (batch_size, nb_points, c). In other words, For each x and y coordinate, I want to extract the whole c features for that coordinate. As I have 150 points per batch, it should result in the above mentioned size.
I attach again my simple list-style code which does the desired behaviour:
feats = torch.stack([torch.stack([img_feat[i,:,x[i,j].long(), y[i,j].long()] for j in range(x.shape[1])]) for i in range(batch_size)])

Thanks so much! I am new to pytorch, and you guys help me a lot!