code: def test_tuple_input(self):
      device = "cuda" if torch.cuda.is_available() else "cpu"
      for model_name, config in self.resnet_variants.items():
          resnet = resnet_generator(model_name)
          model = SimSiam(get_backbone(resnet), **config).to(device)
  
          x0 = torch.rand((self.batch_size, 3, 64, 64)).to(device)
          x1 = torch.rand((self.batch_size, 3, 64, 64)).to(device)
  
          out = model(x0)
          self.assertEqual(
              out[0].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out[1].shape, (self.batch_size, config["out_dim"])
          )
  
          out, features = model(x0, return_features=True)
          self.assertEqual(
              out[0].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out[1].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              features.shape, (self.batch_size, config["num_ftrs"])
          )
  
          out0, out1 = model(x0, x1)
          self.assertEqual(
              out0[0].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out0[1].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out1[0].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out1[1].shape, (self.batch_size, config["out_dim"])
          )
  
          (out0, f0), (out1, f1) = model(x0, x1, return_features=True)
          self.assertEqual(
              out0[0].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out0[1].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out1[0].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              out1[1].shape, (self.batch_size, config["out_dim"])
          )
          self.assertEqual(
              f0.shape, (self.batch_size, config["num_ftrs"])
          )
          self.assertEqual(
              f1.shape, (self.batch_size, config["num_ftrs"])
          )
  
file_path: lightly/tests/models/test_ModelsSimSiam.py
imports: import unittest
  import torch
  import torch.nn
  import torchvision
  from lightly.models import SimSiam
label_desc: Use image node_id 5 for calling the TestSimSiam obj's underlying member method code with example usage: obj.test_tuple_input() without return types