code: def test_moco_projection_head_multiple_layers(
      self, device: str = "cpu", seed=0
  ):
      for in_features, hidden_features, out_features in self.n_features:
          for num_layers in range(2, 5):
              for batch_norm in [True, False]:
                  torch.manual_seed(seed)
                  head = MoCoProjectionHead(
                      in_features,
                      hidden_features,
                      out_features,
                      num_layers,
                      batch_norm,
                  )
                  head = head.eval()
                  head = head.to(device)
                  for batch_size in [1, 2]:
                      msg = (
                          f"head: MoCoProjectionHead"
                          + f"d_in, d_h, d_out = "
                          + f"{in_features}x{hidden_features}x{out_features}"
                      )
                      with self.subTest(msg=msg):
                          x = torch.torch.rand(
                              (batch_size, in_features)
                          ).to(device)
                          with torch.no_grad():
                              y = head(x)
                          self.assertEqual(y.shape[0], batch_size)
                          self.assertEqual(y.shape[1], out_features)
  
file_path: lightly/tests/models/test_ProjectionHeads.py
imports: import unittest
  import torch
  import lightly
  from lightly.models.modules.heads import BarlowTwinsProjectionHead, BYOLPredictionHead, BYOLProjectionHead, DINOProjectionHead, MoCoProjectionHead, MSNProjectionHead, NNCLRPredictionHead, NNCLRProjectionHead, SimCLRProjectionHead, SimSiamPredictionHead, SimSiamProjectionHead, SwaVProjectionHead, SwaVPrototypes, TiCoProjectionHead, VicRegLLocalProjectionHead
label_desc: Use image node_id 12 for calling the TestProjectionHeads obj's underlying member method code with example usage: obj.test_moco_projection_head_multiple_layers(device, seed) without return types