class_docstr: Test case for the implementation of paper:
  `Filter Pruning via Geometric Median for Deep Convolutional Neural Networks Acceleration <https://arxiv.org/abs/1811.00250>`_.
class_docstr_tok: ["Test","case","for","the","implementation","of","paper",":","`","Filter","Pruning","via","Geometric","Median","for","Deep","Convolutional","Neural","Networks","Acceleration","<","https",":","\/\/arxiv.org\/abs\/1811.00250",">","`","_","."]
code: def test_update_mask(self):
      weights = torch.tensor([3.0, 0.1])
      expected_conv1 = (
          torch.ones((2, 1, 3, 3)) * weights[:, None, None, None]
      )
  
      weights = torch.tensor([7.0, 0.4])
      expected_conv2 = (
          torch.ones((2, 2, 3, 3)) * weights[:, None, None, None]
      )
  
      for device in DEVICES:
          self._test_update_mask_on_single_layer(expected_conv1, device)
          self._test_update_mask_on_multiple_layer(
              expected_conv1, expected_conv2, device
          )
  
imports: import copy
  import logging
  import random
  import torch
  from torch import nn
  from torch.ao.pruning._experimental.pruner import SaliencyPruner, LSTMSaliencyPruner, BaseStructuredSparsifier, FakeStructuredSparsity, FPGMPruner
  from torch.nn.utils import parametrize
  from torch.testing._internal.common_utils import TestCase, skipIfTorchDynamo
  from torch.testing._internal.common_pruning import SimpleLinear, LinearBias, LinearActivation, LinearActivationFunctional, SimpleConv2d, Conv2dBias, Conv2dActivation, Conv2dPadBias, Conv2dPool, Conv2dPoolFlatten, Conv2dPoolFlattenFunctional, LSTMLinearModel, LSTMLayerNormLinearModel, rows_are_subset
label_desc: Use image node_id 4 for calling the TestFPGMPruner obj's underlying member method code with example usage: obj.test_update_mask() without return types