RuntimeError: expected scalar type Float but found Half

Can you please help me out with this I am facing a similar problem. Getting the error:
Expected object of scalar type Float but got scalar type Half for argument #2 'mat2' in call to _th_mm

Link to my problem: Expected object of device type cuda but got device type cpu for argument #1 'self' in call to _th_mm

Thanks!