Skip to content

Commit b45d945

Browse files
committed
formatting
1 parent 12b8309 commit b45d945

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

nncf/common/graph/utils.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,13 @@ def get_weight_shape_legacy(layer_attributes: WeightedLayerAttributes) -> List[i
157157
return [
158158
layer_attributes.out_channels,
159159
layer_attributes.in_channels // layer_attributes.groups,
160-
*layer_attributes.kernel_size]
160+
*layer_attributes.kernel_size,
161+
]
161162
return [
162163
layer_attributes.in_channels,
163164
layer_attributes.out_channels // layer_attributes.groups,
164-
*layer_attributes.kernel_size]
165+
*layer_attributes.kernel_size,
166+
]
165167

166168
if isinstance(layer_attributes, GroupNormLayerAttributes):
167169
return [layer_attributes.num_channels]
@@ -204,4 +206,3 @@ def get_num_filters_legacy(layer_attributes: WeightedLayerAttributes) -> int:
204206
"""
205207
weight_shape = layer_attributes.get_weight_shape_legacy()
206208
return weight_shape[layer_attributes.get_target_dim_for_compression_legacy()]
207-

nncf/experimental/torch/sparsity/movement/layers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import nncf
2020
from nncf.common.graph import NNCFNode
21-
from nncf.common.graph.utils import get_weight_shape_legacy
2221
from nncf.common.graph.utils import get_bias_shape_legacy
22+
from nncf.common.graph.utils import get_weight_shape_legacy
2323
from nncf.experimental.torch.sparsity.movement.functions import binary_mask_by_threshold
2424
from nncf.torch.layer_utils import COMPRESSION_MODULES
2525
from nncf.torch.layer_utils import CompressionParameter

nncf/experimental/torch/sparsity/movement/structured_mask_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
from nncf.common.graph.graph import NNCFNodeName
2020
from nncf.common.graph.layer_attributes import LinearLayerAttributes
21-
from nncf.common.graph.utils import get_weight_shape_legacy
2221
from nncf.common.graph.utils import get_bias_shape_legacy
22+
from nncf.common.graph.utils import get_weight_shape_legacy
2323
from nncf.common.logging import nncf_logger
2424
from nncf.experimental.common.pruning.nodes_grouping import get_pruning_groups
2525
from nncf.experimental.common.pruning.nodes_grouping import select_largest_groups

nncf/torch/quantization/algo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
from nncf.common.graph.patterns.manager import TargetDevice
3636
from nncf.common.graph.transformations.commands import TargetType
3737
from nncf.common.graph.utils import get_first_nodes_of_type
38-
from nncf.common.graph.utils import get_weight_shape_legacy
3938
from nncf.common.graph.utils import get_target_dim_for_compression_legacy
39+
from nncf.common.graph.utils import get_weight_shape_legacy
4040
from nncf.common.hardware.config import HWConfig
4141
from nncf.common.hardware.config import HWConfigType
4242
from nncf.common.hardware.config import get_hw_config_type

nncf/torch/quantization/init_range.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import nncf
2020
from nncf.common.graph.layer_attributes import WeightedLayerAttributes
21-
from nncf.common.graph.utils import get_weight_shape_legacy
2221
from nncf.common.graph.utils import get_target_dim_for_compression_legacy
22+
from nncf.common.graph.utils import get_weight_shape_legacy
2323
from nncf.common.quantization.initialization.range import RangeInitCollectorParams
2424
from nncf.common.quantization.initialization.range import RangeInitConfig
2525
from nncf.common.quantization.initialization.range import RangeInitParams

0 commit comments

Comments
 (0)