At first, is there an optimal approach of creating labelC using the Pytorch inbuilt built function rather than my naive approach of using the bitwise operator?
Regarding the change in dtype after transformation, I am not quite sure if this is based on my implementation or its a bug perse.