Skip to content

Commit

Permalink
Fix (graph/equalize): new transpose interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Feb 6, 2024
1 parent c9f28d7 commit 3f8e41a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/brevitas/graph/equalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ def _no_equalize():
# weight equalization
if merge_bias:
src_weights = {
name: _combine_weights_bias(transpose(m, axis), bias_shrinkage, m.bias)
name: _combine_weights_bias(transpose(m.weight, axis), bias_shrinkage, m.bias)
for name, (m, axis) in src_axes.items()}
else:
src_weights = {name: transpose(m, axis) for name, (m, axis) in src_axes.items()}
src_weights = {name: transpose(m.weight, axis) for name, (m, axis) in src_axes.items()}
for k, v in src_weights.items():
# Srcs are always fully equalized, thus we simply need to apply the offset to position them
# correctly with respect to the other srcs matrices.
Expand Down

0 comments on commit 3f8e41a

Please sign in to comment.