Closed jmitrevs closed 10 months ago
I should also mention that this is only for 'io_stream` and only for Vivado and Vitis. There is not Quartus support.
I think we should also support depth_multiplier!=1
. Or is that not used often?
@bo3z, are there any other things needed for this PR?
@bo3z, are there any other things needed for this PR?
Looks good to me. Maybe worth opening an issue to keep track of the TODOs from this PR (resource strategy and multiplier != 1).
Description
There was a request to add support for
QDepthwiseConv2D
for QKeras. Previously we had Keras support forDepthwiseConv1D
andDepthwiseConv2D
but only as part of separable convolutions. This PR adds support for standaloneDepthwiseConv1D
andDepthwiseConv2D
, and alsoQDepthwiseConv2D
. Currently onlydepth_multiplier=1
is supported.Note that QKeras doesn't support
QDepthwiseConv1D
.Adding this found an issue in that arguments to activations passed as parameters to, e.g.
QDense
, such asactivation='quantized_relu(3, 0)'
, were ignored. This had the same effect asactivation='quantized_relu()'
.Type of change
Tests
Tests added to both
test_keras_api.py
andtest_qkeras.py
Checklist
pre-commit
on the files I edited or added.