Algorithm 1: Unit pruning algorithm
Data:  $\theta \in \mathbb{R}^a$ $(\pmb {\chi}_t,\pmb {\gamma}_t)$ $(\pmb {x}_v,\pmb {y}_v)$ $p_u$  , scoring metric,  $f_{s}(\theta ,(\pmb{x}_{v},\pmb{y}_{v}))$  (loss sensitivity)   
Result: mask, M   
 $\pmb{\theta}\gets \text{train} (\pmb {\theta},(\pmb {x}_t,\pmb {y}_t));$  /\* Train the dense NN \*/   
 $A_{v}\gets Acc(\pmb {\theta},(\pmb{x}_{v},\pmb{y}_{v}))$ $p\gets 0$  /\* Assign initial pruning percentage as O \*/   
 $p_{min}\gets 100 / (\sum N_l);$  /\* minimum pruning percentage difference \*/   
prune  $\leftarrow$  True;   
while prune  $= =$  True do   
 $p = p + p_u;$ $S\gets f_s(\pmb {\theta},(\pmb {x}_v,\pmb {y}_v));$  /\* Pruning scores equal to the loss sensitivity \*/   
 $T\gets$  percentile(S,p);   
 $M_p\gets \mathbb{I}(S > T);$  /\* Threshold the scores to obtain mask \*/   
 $\theta_p\gets \theta \odot M_p;$ $\theta_p\gets \text{train} (\theta_p,(\pmb {x}_t,\pmb {y}_t));$  /\* Train the NN \*/   
 $A\gets \text{acc} (\theta_p,(\pmb {x}_v,\pmb {y}_v));$    
if  $A> = A_v$  then   
 $\begin{array}{rl}{\boldsymbol{\theta}}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta}}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta}}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta}}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta}}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta}}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta }}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta }}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta }}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta }}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta }}&{\leftarrow\boldsymbol{\theta}_{p};}\\{\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta}}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow \boldsymbol{\theta}_{p};}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\boldsymbol{\theta }}&{\leftarrow 2;}\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots}&\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdot} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {\vdots} &\\ {end}\end{array}$    
end