code: def test_attack_masked_random_start(self) -> None:
      model = BasicModel()
      input = torch.tensor([[2.0, -9.0, 9.0, 1.0, -3.0]])
      mask = torch.tensor([[1, 0, 1, 0, 1]])
      adv = PGD(model)
      perturbed_input = adv.perturb(
          input, 0.25, 0.1, 0, 4, random_start=True, mask=mask
      )
      assertTensorAlmostEqual(
          self,
          perturbed_input,
          [[2.0, -9.0, 9.0, 1.0, -3.0]],
          delta=0.25,
          mode="max",
      )
      perturbed_input = adv.perturb(
          input,
          0.25,
          0.1,
          0,
          4,
          norm="L2",
          random_start=True,
          mask=mask,
      )
      norm = torch.norm((perturbed_input - input).squeeze()).numpy()
      self.assertLessEqual(norm, 0.25)
  
file_path: captum/tests/robust/test_PGD.py
imports: import torch
  from captum.robust import PGD
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicModel, BasicModel2, BasicModel_MultiLayer
  from torch.nn import CrossEntropyLoss
label_desc: Use image node_id 11 for calling the Test obj's underlying member method code with example usage: obj.test_attack_masked_random_start() without return types