lets say I have tensor of shape  (2, 10) .
I want to create a mask tensor with same shape that is ‘1’ only immediately  after occurrence of a specific value and ‘0’ elsewhere.
For example considering I want to mask indices after 3:
x = tensor([[1, 3, 4, 5, 3, 6],
        [1, 2, 5, 3, 7, 9]])
mask = tensor([[False,  False, True, False,  False, True],
        [False, False, False,  False, True, False]])

x.eq(3) will mask indices of 3 but not the next index.
Thanks for ur help