Skip to main content
. 2023 Feb 7;23(4):1874. doi: 10.3390/s23041874
Algorithm 1 Original Stepwise Weight Pruning Algorithm (SWPA) [43]
  • Input: training data XRn×d, training labels Y, base network fθ(.), Drop-in Layer W, Step Counter nZ1. Selection factor

    f[0,1]

  • for count in 1,,n+1 do

  •     O{w1x1,,wdxd}

  •     if count > 1 then

  •         k(1f)·dn

  •         Sort the weights W of the Drop-in Layer based on their absolute value.

  •         Set the least k of them to 0.

  •     Train the base network on O

  • Take the features corresponding to the top f fraction of the weights in W based on their absolute value and train them on the base network.