Skip to content

Commit

Permalink
Fix (graph_quant): add check for unsigned activation
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 authored and volcacius committed Apr 21, 2023
1 parent 3a4e662 commit ebae32d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/brevitas/graph/quantize_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def are_inputs_unsigned(model, node, is_unsigned_list, quant_act_map, unsigned_a
for inp_node in node.all_input_nodes:
if inp_node.op == 'call_module':
inp_module = get_module(model, inp_node.target)
if isinstance(inp_module, tuple(quant_act_map.keys())):
if isinstance(inp_module, tuple(quant_act_map.keys())) and isinstance(
inp_module, unsigned_act_tuple):
is_unsigned_list.append(True)
elif isinstance(inp_module, tuple(SIGN_PRESERVING_MODULES)):
are_inputs_unsigned(
Expand Down

0 comments on commit ebae32d

Please sign in to comment.