Skip to content

QConv alpha != 1 bug fix

Javier Duarte requested to merge github/fork/bo3z/qconv-auto-alpha-bugfix into main

Created by: bo3z

A# Description

📝 Please include a summary of the change. When using alpha='auto' an exception is thrown because Conv1D & Conv2D have no attribute n_in, n_out which is needed for the ApplyAlpha 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

Merge request reports

Loading