L1 and MSE Loss and float() casting

Here is the code authors use for calculating L1 and MSE Loss:

F.l1_loss(a_3.float(), mean7), F.mse_loss(a_3, mean7).sqrt()

First tensor in l1_loss was cast-ed to float() but same was not done in mse_loss(). Why?

Even if I remove the cast, I still get the exact same result from l1_loss

I checked PyTorch’s l1_loss docs and even source-code of l1_loss and none of them mentioned any float requirement.