Skip to content

Commit

Permalink
fix: wrong pool layer req bw cause overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
calad0i committed Apr 26, 2024
1 parent 02d4b73 commit 2ba9ded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HGQ/proxy/precision_derivation.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def get_requested_kif(layer: keras.layers.Layer | FixedPointQuantizer) -> tuple[
@singledispatch
def get_request_kif(layer: keras.layers.Layer) -> tuple[int, int, int]:
"""Get the requested bitwidth of a layer, as a tuple of (k, i, f)"""
if isinstance(layer, (Pooling1D, Pooling2D, Pooling3D, Concatenate, Reshape, Flatten)):
if isinstance(layer, (Concatenate, Reshape, Flatten)):
out_layers: list[keras.layers.Layer] = [node.outbound_layer for node in layer._outbound_nodes]
if out_layers:
# Layers that does nothing. Pass through.
Expand Down

0 comments on commit 2ba9ded

Please sign in to comment.