Thanks @albanD for the suggestion.
I confirmed that the error with (a - b).abs().mean() is smaller than F.l1_loss.
Error with (a - b).abs().mean() => 2.086162567138672e-07
Error with F.l1_loss => 0.0002072751522064209