Skip to content

Commit

Permalink
Fix (graph/standardize): correct check for Mean to AvgPool (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 authored Apr 30, 2024
1 parent 33df0c0 commit 0c52c9a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/brevitas/graph/standardize.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def match_node(self, node: Node) -> bool:
is_adaptive_2d_mean = ((2, 3) in node.args or [2, 3] in node.args or
'dim' in node.kwargs and
(node.kwargs['dim'] == (2, 3) or node.kwargs['dim'] == [2, 3]))
is_adaptive_2d_mean = is_adaptive_2d_mean and not node.kwargs['keepdim']
return spr and is_adaptive_2d_mean

def move_node_args_to_kwargs(self, node: Node):
Expand Down

0 comments on commit 0c52c9a

Please sign in to comment.