From 8a151beeba2e9ced126e374749424677b7b928a2 Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Fri, 23 Aug 2024 11:35:00 +0100 Subject: [PATCH] fix transposed --- src/brevitas/quant/solver/parameter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/brevitas/quant/solver/parameter.py b/src/brevitas/quant/solver/parameter.py index 198505ec8..67c3a56c1 100644 --- a/src/brevitas/quant/solver/parameter.py +++ b/src/brevitas/quant/solver/parameter.py @@ -137,7 +137,7 @@ def expanded_scaling_shape(module, input_channel_dim, group_size=None): @value def input_channel_dim(module): - return 1 if not module.transposed else 0 + return 1 if not hasattr(module, 'transposed') or not module.transposed else 0 @value def padding(module, input_channel_dim, group_size): @@ -151,7 +151,7 @@ def padding(module, input_channel_dim, group_size): @value def group_dim(module, group_size=None): if group_size is not None: - return 1 if not module.transposed else 0 + return 1 if not hasattr(module, 'transposed') or not module.transposed else 0 class SolveInputViewImpl(ExtendedInjector):