tests/torch/pruning/filter_pruning/test_algo.py
def create_pruning_algo_with_config(config, dim=2):
    """
    Create filter_pruning with default params.
    :param config: config for the algorithm
    :return pruned model, pruning_algo, nncf_modules
    """
    config['compression']['algorithm'] = 'filter_pruning'
    model = BigPruningTestModel(dim)
    pruned_model, pruning_algo = create_compressed_model_and_algo_for_test(BigPruningTestModel(dim), config)

    # Check that all modules was correctly replaced by NNCF modules and return this NNCF modules
    _, nncf_modules = check_correct_nncf_modules_replacement(model, pruned_model)
    return pruned_model, pruning_algo, nncf_modules

    Create filter_pruning with default params.
    :param config: config for the algorithm
    :return pruned model, pruning_algo, nncf_modules
    
Create filter_pruning with default params.
:param config: config for the algorithm
:return pruned model, pruning_algo, nncf_modules
Create filter_pruning with default params . : param config : config for the algorithm : return pruned model pruning_algo nncf_modules
def create_pruning_algo_with_config(config, dim=2):
    config['compression']['algorithm'] = 'filter_pruning'
    model = BigPruningTestModel(dim)
    pruned_model, pruning_algo = create_compressed_model_and_algo_for_test(BigPruningTestModel(dim), config)
    _, nncf_modules = check_correct_nncf_modules_replacement(model, pruned_model)
    return pruned_model, pruning_algo, nncf_modules
def create_pruning_algo_with_config ( config , dim = 2 ) : config [ 'compression' ] [ 'algorithm' ] = 'filter_pruning' model = BigPruningTestModel ( dim ) pruned_model , pruning_algo = create_compressed_model_and_algo_for_test ( BigPruningTestModel ( dim ) , config ) _ , nncf_modules = check_correct_nncf_modules_replacement ( model , pruned_model ) return pruned_model , pruning_algo , nncf_modules
Create filter_pruning with default params.
Create filter_pruning with default params .
"""
    Create filter_pruning with default params.
    :param config: config for the algorithm
    :return pruned model, pruning_algo, nncf_modules
    """ # Check that all modules was correctly replaced by NNCF modules and return this NNCF modules
config
dim