tests/torch/pruning/filter_pruning/test_algo.py
def check_module_output(module, name, num):
        """
        Checks that output of module are masked.
        """
        mask = ref_masks[dim][num]
        input_ = torch.ones(input_shapes[name])
        output = module(input_)
        ref_output = apply_filter_binary_mask(mask, output, dim=1)
        assert torch.allclose(output, ref_output)

        Checks that output of module are masked.
        
Checks that output of module are masked.
Checks that output of module are masked .
def check_module_output(module, name, num):
        mask = ref_masks[dim][num]
        input_ = torch.ones(input_shapes[name])
        output = module(input_)
        ref_output = apply_filter_binary_mask(mask, output, dim=1)
        assert torch.allclose(output, ref_output)
def check_module_output ( module , name , num ) : mask = ref_masks [ dim ] [ num ] input_ = torch . ones ( input_shapes [ name ] ) output = module ( input_ ) ref_output = apply_filter_binary_mask ( mask , output , dim = 1 ) assert torch . allclose ( output , ref_output )
Checks that output of module are masked.
Checks that output of module are masked .
"""
        Checks that output of module are masked.
        """
module
name
num