| Algorithm A1 hist_amount pruning method | |
| pruned ← 0 | ▹ set the number of pruned weights to 0 |
| i ← 0 | ▹ used for bins indexing |
| while pruned < fhist_amount · size (W) do | ▹ pruned is lower than the threshold |
| for all w ∈ Bi do | ▹ set all the weights in the bin Bi to 0 |
| w ← 0 | |
| end for | |
| pruned ← pruned + size (Bi) | ▹ update the pruned weights amount |
| i ← i + 1 | |
| end while | |