code: def test_ill_arg(self):
      with self.assertRaises(ValueError):
          ViT(
              in_channels=1,
              img_size=(128, 128, 128),
              patch_size=(16, 16, 16),
              hidden_size=128,
              mlp_dim=3072,
              num_layers=12,
              num_heads=12,
              pos_embed="conv",
              classification=False,
              dropout_rate=5.0,
          )
  
      with self.assertRaises(ValueError):
          ViT(
              in_channels=1,
              img_size=(32, 32, 32),
              patch_size=(64, 64, 64),
              hidden_size=512,
              mlp_dim=3072,
              num_layers=12,
              num_heads=8,
              pos_embed="perceptron",
              classification=False,
              dropout_rate=0.3,
          )
  
      with self.assertRaises(ValueError):
          ViT(
              in_channels=1,
              img_size=(96, 96, 96),
              patch_size=(8, 8, 8),
              hidden_size=512,
              mlp_dim=3072,
              num_layers=12,
              num_heads=14,
              pos_embed="conv",
              classification=False,
              dropout_rate=0.3,
          )
  
      with self.assertRaises(ValueError):
          ViT(
              in_channels=1,
              img_size=(97, 97, 97),
              patch_size=(4, 4, 4),
              hidden_size=768,
              mlp_dim=3072,
              num_layers=12,
              num_heads=8,
              pos_embed="perceptron",
              classification=True,
              dropout_rate=0.3,
          )
  
      with self.assertRaises(ValueError):
          ViT(
              in_channels=4,
              img_size=(96, 96, 96),
              patch_size=(16, 16, 16),
              hidden_size=768,
              mlp_dim=3072,
              num_layers=12,
              num_heads=12,
              pos_embed="perc",
              classification=False,
              dropout_rate=0.3,
          )
  
file_path: MONAI/tests/test_vit.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.networks import eval_mode
  from monai.networks.nets.vit import ViT
  from tests.utils import SkipIfBeforePyTorchVersion, skip_if_quick, test_script_save
label_desc: Use image node_id 2 for calling the TestViT obj's underlying member method code with example usage: obj.test_ill_arg() without return types