Regularization on a subset of parameters

Hello,

I was wondering, what is the best way to apply L2 or L1 regularization to only some of the parameters of a network instead of all of them? For example, for a network with 3 fully connected layers.

Thanks,

Hossein

Have a look at this topic / answer: Don't Regularize Me, Bro