I have a tensor  x :
x.shape
torch.Size([90, 50])
dtype=torch.float64, device='cuda:0'

and I need to select rows defined by the list:
loc = [0, 0, 0, 1, 0, 1, 1, 0, 1,..., 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1]
# len(loc) is 90

and store the selected rows into tensor y
I think there is this function  torch.masked_scatter_(), but I did not manage to use it successfully!