Add quantized sigmoid, fix quantized tanh for QKeras
Created by: jmitrevs
This is an attempt to fix quantized tanh and add quantized sigmoid activation support for QKeras ingestion. In Quartus the tanh handling probably needs an optimizer to rename it to dense_tanh (and that is why the tests fail--the hacky fix in the writer doesn't work), but for Vivado I think this generally works. Overall, though, I think this fix is only temporary. The method breaks if granularity='name'
is not used in hls4ml.utils.config_from_keras_model
, though this feature is not just for these quantizers.
Any suggestions?