I have a torch tensor x with size torch.Size([10, 1, 28, 28]) and a logical np array a:
array([False, False, False, False, False, False,  True,  True,  True, True])

I want to select the first dimension of x according to logical values in a. But I got error when I try  x[a]. What should I do?