RuntimeError: result type Float can't be cast to the desired output type Long

Hello guys,
So, I am usuing the torch.bitwise_xor function and the error that I am getting is the one that is in the title.
I tried to cast the result with several methods like .to(torch.long) or .long() or torch.LongTensor()
any idea?

def forward(self,x):
        out_clean = self.Layer_clean(x)
        dummy_output = self.Dummy_layer(x)
        cd1 = out_clean.argmax(dim=1)
        b = torch.bitwise_xor(dummy_output,cd1).to(torch.long)
        return b

Can you confirm that the inputs to bitwise_xor are integer?

Yes, indeed! I did confirm that

The error is due to something else.

Could you post the complete error message including the stack trace and print the inputs to bitwise_xor, please?