nncf/torch/pruning/filter_pruning/algo.py
def _calculate_flops_and_weights_in_uniformly_pruned_model(self, pruning_level: float) -> Tuple[int, int]:
        """
        Prune all prunable modules in model by pruning_level level and returns number of weights and
        flops of the pruned model.

        :param pruning_level: proportion of zero filters in all modules
        :return: flops number in pruned model
        """
        tmp_in_channels, tmp_out_channels = \
            calculate_in_out_channels_in_uniformly_pruned_model(
                pruning_groups=self.pruned_module_groups_info.get_all_clusters(),
                pruning_level=pruning_level,
                full_input_channels=self._modules_in_channels,
                full_output_channels=self._modules_out_channels,
                pruning_groups_next_nodes=self.next_nodes)

        return count_flops_and_weights(self._model.get_original_graph(),
                                       self._modules_in_shapes,
                                       self._modules_out_shapes,
                                       input_channels=tmp_in_channels,
                                       output_channels=tmp_out_channels,
                                       conv_op_metatypes=GENERAL_CONV_LAYER_METATYPES,
                                       linear_op_metatypes=LINEAR_LAYER_METATYPES)

        Prune all prunable modules in model by pruning_level level and returns number of weights and
        flops of the pruned model.

        :param pruning_level: proportion of zero filters in all modules
        :return: flops number in pruned model
        
Prune all prunable modules in model by pruning_level level and returns number of weights and
flops of the pruned model.
Prune all prunable modules in model by pruning_level level and returns number of weights and flops of the pruned model .
def _calculate_flops_and_weights_in_uniformly_pruned_model(self, pruning_level: float) -> Tuple[int, int]:
        tmp_in_channels, tmp_out_channels = \
            calculate_in_out_channels_in_uniformly_pruned_model(
                pruning_groups=self.pruned_module_groups_info.get_all_clusters(),
                pruning_level=pruning_level,
                full_input_channels=self._modules_in_channels,
                full_output_channels=self._modules_out_channels,
                pruning_groups_next_nodes=self.next_nodes)
        return count_flops_and_weights(self._model.get_original_graph(),
                                       self._modules_in_shapes,
                                       self._modules_out_shapes,
                                       input_channels=tmp_in_channels,
                                       output_channels=tmp_out_channels,
                                       conv_op_metatypes=GENERAL_CONV_LAYER_METATYPES,
                                       linear_op_metatypes=LINEAR_LAYER_METATYPES)
def _calculate_flops_and_weights_in_uniformly_pruned_model ( self , pruning_level : float ) -> Tuple [ int , int ] : tmp_in_channels , tmp_out_channels = calculate_in_out_channels_in_uniformly_pruned_model ( pruning_groups = self . pruned_module_groups_info . get_all_clusters ( ) , pruning_level = pruning_level , full_input_channels = self . _modules_in_channels , full_output_channels = self . _modules_out_channels , pruning_groups_next_nodes = self . next_nodes ) return count_flops_and_weights ( self . _model . get_original_graph ( ) , self . _modules_in_shapes , self . _modules_out_shapes , input_channels = tmp_in_channels , output_channels = tmp_out_channels , conv_op_metatypes = GENERAL_CONV_LAYER_METATYPES , linear_op_metatypes = LINEAR_LAYER_METATYPES )
Prune all prunable modules in model by pruning_level level and returns number of weights and
flops of the pruned model.
Prune all prunable modules in model by pruning_level level and returns number of weights and flops of the pruned model .
"""
        Prune all prunable modules in model by pruning_level level and returns number of weights and
        flops of the pruned model.

        :param pruning_level: proportion of zero filters in all modules
        :return: flops number in pruned model
        """
flops number in pruned model
flops number in pruned model
self
pruning_level
float
proportion of zero filters in all modules
proportion of zero filters in all modules