PyTorch already provides both of these as loss functions. ... Like, the L1 loss is just equal to (a-b).abs().mean(), where a and b are tensors.
確定! 回上一頁