How to customize connections between layers #1073
-
I am exploring an algorithim that selects only the most critical connections between layers. For example we are considering this baseline network:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Zero weights can be removed by the compiler when synthesizing, |
Beta Was this translation helpful? Give feedback.
-
What you are referring to is pruning and as @jmitrevs points out, hls4ml will optimise away zero weights (connections) in the Latency strategy. There are many different ways of pruning a neural network; the most basic one is using TensorFlow Model Optimization, which is linked with hls4ml in this tutorial: https://github.com/fastmachinelearning/hls4ml-tutorial/blob/main/part3_compression.ipynb. You could also look into more advanced techniques, such as hardware-aware pruning: https://arxiv.org/abs/2308.05170 which is also part of hls4ml (see the documentation under docs/) |
Beta Was this translation helpful? Give feedback.
Zero weights can be removed by the compiler when synthesizing,