nncf/common/pruning/node_selector.py
def _pruning_dimensions_analysis(self, graph, can_prune_after_check) -> Dict[int, PruningAnalysisDecision]:
        """
        Check all nodes that were marked as prunable after the model analysis and compatibility check vs.
        pruning algo have a correct correspondent closing node on each path form self to outputs.

        :param graph: Graph to work with.
        :param can_prune_after_check: Dict of node indices vs the decision made by previous steps;
            the decision is true only for the nodes that do not conflict with mask propagation and
            are supported by the NNCF pruning algorithm
        :return: Pruning node analysis after model analyzer, pruning algo compatibility and pruning dimensions checks.
        """
        mask_prop_algo = MaskPropagationAlgorithm(graph, self._pruning_operator_metatypes)
        can_prune_by_dim = mask_prop_algo.symbolic_mask_propagation(self._prune_operations_types, can_prune_after_check)

        can_prune_for_prunable_layers = \
            {node_id: can_prune_after_check[node_id].join(can_prune_by_dim[node_id]) for node_id in can_prune_by_dim}

        can_prune_updated = can_prune_after_check.copy()
        can_prune_updated.update(can_prune_for_prunable_layers)
        return can_prune_updated

        Check all nodes that were marked as prunable after the model analysis and compatibility check vs.
        pruning algo have a correct correspondent closing node on each path form self to outputs.

        :param graph: Graph to work with.
        :param can_prune_after_check: Dict of node indices vs the decision made by previous steps;
            the decision is true only for the nodes that do not conflict with mask propagation and
            are supported by the NNCF pruning algorithm
        :return: Pruning node analysis after model analyzer, pruning algo compatibility and pruning dimensions checks.
        
Check all nodes that were marked as prunable after the model analysis and compatibility check vs.
pruning algo have a correct correspondent closing node on each path form self to outputs.
Check all nodes that were marked as prunable after the model analysis and compatibility check vs . pruning algo have a correct correspondent closing node on each path form self to outputs .
def _pruning_dimensions_analysis(self, graph, can_prune_after_check) -> Dict[int, PruningAnalysisDecision]:
        mask_prop_algo = MaskPropagationAlgorithm(graph, self._pruning_operator_metatypes)
        can_prune_by_dim = mask_prop_algo.symbolic_mask_propagation(self._prune_operations_types, can_prune_after_check)
        can_prune_for_prunable_layers = \
            {node_id: can_prune_after_check[node_id].join(can_prune_by_dim[node_id]) for node_id in can_prune_by_dim}
        can_prune_updated = can_prune_after_check.copy()
        can_prune_updated.update(can_prune_for_prunable_layers)
        return can_prune_updated
def _pruning_dimensions_analysis ( self , graph , can_prune_after_check ) -> Dict [ int , PruningAnalysisDecision ] : mask_prop_algo = MaskPropagationAlgorithm ( graph , self . _pruning_operator_metatypes ) can_prune_by_dim = mask_prop_algo . symbolic_mask_propagation ( self . _prune_operations_types , can_prune_after_check ) can_prune_for_prunable_layers = { node_id : can_prune_after_check [ node_id ] . join ( can_prune_by_dim [ node_id ] ) for node_id in can_prune_by_dim } can_prune_updated = can_prune_after_check . copy ( ) can_prune_updated . update ( can_prune_for_prunable_layers ) return can_prune_updated
Check all nodes that were marked as prunable after the model analysis and compatibility check vs.
pruning algo have a correct correspondent closing node on each path form self to outputs.
Check all nodes that were marked as prunable after the model analysis and compatibility check vs . pruning algo have a correct correspondent closing node on each path form self to outputs .
"""
        Check all nodes that were marked as prunable after the model analysis and compatibility check vs.
        pruning algo have a correct correspondent closing node on each path form self to outputs.

        :param graph: Graph to work with.
        :param can_prune_after_check: Dict of node indices vs the decision made by previous steps;
            the decision is true only for the nodes that do not conflict with mask propagation and
            are supported by the NNCF pruning algorithm
        :return: Pruning node analysis after model analyzer, pruning algo compatibility and pruning dimensions checks.
        """
Pruning node analysis after model analyzer, pruning algo compatibility and pruning dimensions checks.
Pruning node analysis after model analyzer pruning algo compatibility and pruning dimensions checks .
self
graph
Graph to work with.
Graph to work with .
can_prune_after_check
Dict of node indices vs the decision made by previous steps;
the decision is true only for the nodes that do not conflict with mask propagation and
are supported by the NNCF pruning algorithm
Dict of node indices vs the decision made by previous steps ; the decision is true only for the nodes that do not conflict with mask propagation and are supported by the NNCF pruning algorithm