Solved by Sunshine352 in post #2 
              
              
                Data Type Inconsistency 
scalar type is not Half (torch.float16), but float (torch.float32) 
You should convert scalar to Half like this: 
scalar = scalar.to(torch.float16)