Greetings, I am trying to quantize the network for the KWS application using DS CNN. The network is described here (LINK)(lines from 85 to 141).
When running AutoQKeras, It shows an error on energy estimation for Average2D pooling layers:
Traceback (most recent call last):
File "/home/auto_qk.py", line 180, in
autoqk = AutoQKeras(model, metrics=[keras.metrics.SparseCategoricalAccuracy()], custom_objects=custom_objects, **run_config)
File "/usr/local/lib/python3.8/dist-packages/qkeras/autoqkeras/autoqkeras_internal.py", line 831, in init
self.hypermodel = AutoQKHyperModel(
File "/usr/local/lib/python3.8/dist-packages/qkeras/autoqkeras/autoqkeras_internal.py", line 125, in init
self.reference_size = self.target.get_reference(model)
File "/usr/local/lib/python3.8/dist-packages/qkeras/autoqkeras/forgiving_metrics/forgiving_energy.py", line 121, in get_reference
energy_dict = q.pe(
File "/usr/local/lib/python3.8/dist-packages/qkeras/qtools/run_qtools.py", line 85, in pe
energy_dict = qenergy.energy_estimate(
File "/usr/local/lib/python3.8/dist-packages/qkeras/qtools/qenergy/qenergy.py", line 302, in energy_estimate
add_energy = OP[get_op_type(accumulator.output)]["add"](
AttributeError: 'NoneType' object has no attribute 'output'
When I remove the Average2D pooling layer, the AutoQKeras does not produce the error. I tried to set quant parameters for AveragePooling, but no luck.
Greetings, I am trying to quantize the network for the KWS application using DS CNN. The network is described here (LINK)(lines from 85 to 141).
When running AutoQKeras, It shows an error on energy estimation for Average2D pooling layers:
Traceback (most recent call last): File "/home/auto_qk.py", line 180, in
autoqk = AutoQKeras(model, metrics=[keras.metrics.SparseCategoricalAccuracy()], custom_objects=custom_objects, **run_config)
File "/usr/local/lib/python3.8/dist-packages/qkeras/autoqkeras/autoqkeras_internal.py", line 831, in init
self.hypermodel = AutoQKHyperModel(
File "/usr/local/lib/python3.8/dist-packages/qkeras/autoqkeras/autoqkeras_internal.py", line 125, in init
self.reference_size = self.target.get_reference(model)
File "/usr/local/lib/python3.8/dist-packages/qkeras/autoqkeras/forgiving_metrics/forgiving_energy.py", line 121, in get_reference
energy_dict = q.pe(
File "/usr/local/lib/python3.8/dist-packages/qkeras/qtools/run_qtools.py", line 85, in pe
energy_dict = qenergy.energy_estimate(
File "/usr/local/lib/python3.8/dist-packages/qkeras/qtools/qenergy/qenergy.py", line 302, in energy_estimate
add_energy = OP[get_op_type(accumulator.output)]["add"](
AttributeError: 'NoneType' object has no attribute 'output'
When I remove the Average2D pooling layer, the AutoQKeras does not produce the error. I tried to set quant parameters for AveragePooling, but no luck.
Code for AutoQKeras:
AutoQkeras start