I have a output tensor from a semantic segmentation network of size (21,512,512)  where for each pixel there is a softmax probability vector. How can I convert it into output of same shape but with each pixel now having a one hot encoding?