Skip to content

Commit 96d601c

Browse files
committed
minor refactor
1 parent 947438e commit 96d601c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nncf/quantization/algorithms/weight_compression/scale_estimation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def calculate_quantization_params(
204204
# 3D: [num_experts, hidden_dimension, out_features] -> [num_experts, out_features, hidden_dimension]
205205
# 2D: [hidden_dimension, out_features] -> [out_features, hidden_dimension]
206206
weight = fns.moveaxis(weight, -1, -2)
207-
reduction_axis = list(range(len(weight.shape)))[-1]
207+
reduction_axis = weight.ndim - 1
208208
was_transposed = True
209209

210210
group_size = config.group_size if config.group_size != -1 else weight.shape[reduction_axis]

0 commit comments

Comments
 (0)