Convert onehot encoded output to target

Currently i have my targets one hot encoded st their values are:

tensor([[1, 0],
        [0, 1],
        [0, 1],
        [0, 1],
        [0, 1],
        [0, 1],
        [1, 0],
        [0, 1],
        [1, 0],
        [1, 0]])

for a batch size 10,
how do i convert these to required format for CrossEntropy before training?

Thanks

solved