Which algorithm PyTorch use to optimize L1 penalty say in case of LASSO

I really want to know which algorithm Pytorch use to optimize L1 penalty.
Like scikit-learn clearly mentions that - “We use the truncated gradient algorithm proposed by Tsuruoka et al. 2009 for L1 regularization (and the Elastic Net).” (https://scikit-learn.org/stable/modules/sgd.html#implementation-details).

I really searched a lot but I couldn’t find the answer.

1 Like

Pytorch lets you choose which optimization algorithm to use for any penalty that you would like to optimize.Here’s an example that uses SGD to optimize the L1 penalty. link
You could replace the SGD with any other optimizer available in PyTorch or make your own custom one.