How to customize connections between layers #1073
Replies: 2 comments
-
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.
-
I am exploring an algorithim that selects only the most critical connections between layers. For example we are considering this baseline network:
What would be the best approach to still keep supporting HLS4ML flow and adjust the connections (by removing or keeping some of them) between each layer?
Beta Was this translation helpful? Give feedback.
All reactions