Pytorch, Machine Learning, Gradient Descent, Python, Hands On Tutorials.
capture by author. Smooth L1 loss (torch.nn.SmoothL1Loss) is roughly equivalent to Huber loss with an extra beta parameter. Source: link. Screen capture by author. We wrap everything we’ve done so far in a loop to try out all the loss functions and plot them together: def multi_plot(lr=0.1,