Gratefully thanks!After your hint,it really proves that the function scatter,needs every parameter as the same dtype.So just let the variable ‘a’ turns to the dtype torch.float32,exactly just add .float() at the end,and the code works.