-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Hi @sgazagnes, thanks for giving hls4ml a try and reporting your feedback. In this case, the behavior you see is actually fully expected. In your M1 case, the default, you see the effect of reducing the variable precision after the training, so Post Training Quantizaton (PTQ). If you continue with the tutorial until part 4, you will actually see how this gets fixed by using quantization-aware training (QAT) with the QKeras package to directly train with the final model precision. What is happening in case of your M2 and M3 model is that with the large variable precision you choose, the output of the dense layer can't be mapped into the narrow range of values of the lookup table that the softmax implementation in hls4ml uses, which basically destroys the precision. Hope this helps, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.




All of these issues are related to the softmax. You can see changes in the tails if you make any of these changes:
config['LayerName']['softmax']['TableSize'] = 4096to the config.config['LayerName']['softmax']['Implementation'] = 'latency'