QConv alpha != 1 bug fix
Created by: bo3z
A# Description
📝 Please include a summary of the change. When usingalpha='auto'
an exception is thrown because Conv1D & Conv2D have no attributen_in
,n_out
which is needed for theApplyAlpha
layer config template
Type of change
-
Bug fix (non-breaking change that fixes an issue)
Tests
📝 Please describe the tests that you ran to verify your changes. To reproduce error, run most up-to-date version of hls4ml with the following QKeras model:
keras_model = Sequential()
keras_model.add(QConv2D(4, (3, 3), input_shape=(4, 4, 1), kernel_quantizer=quantized_bits(4, 0, alpha='auto')))
keras_model.compile()
-
I have read the guidelines for contributing. -
I have commented my code, particularly in hard-to-understand areas. -
I have made corresponding changes to the documentation. -
My changes generate no new warnings. -
I have added tests that prove my fix is effective or that my feature works.B