class_docstr: Test ActionClip prompts
code: def test_visual_prompt_lstm(self):
      x = torch.rand(1, 4, 8)
      fake_clip_weights = OrderedDict()
      fake_clip_weights["text_projection"] = torch.rand(1, 8)
      fake_clip_weights["positional_embedding"] = torch.rand(4)
      fake_clip_weights["ln_final.weight"] = torch.rand(64, 1)
  
      model1 = VisualPrompt(
          sim_head="LSTM",
          clip_state_dict=fake_clip_weights,
          num_frames=4,
      )
      out1 = model1(x)
      # print(type(model1.lstm_visual), out1.shape)
      self.assertTrue(isinstance(model1.lstm_visual, torch.nn.LSTM))
      self.assertTrue(out1.shape == (1, 8))
  
      model2 = VisualPrompt(
          sim_head="Transf",
          clip_state_dict=fake_clip_weights,
          num_frames=4,
      )
      out2 = model2(x)
      # print(type(model2.transformer), out2.shape)
      self.assertTrue(
          isinstance(model2.transformer, TemporalTransformer)
      )
      self.assertTrue(out2.shape == (1, 8))
  
      model3 = VisualPrompt(
          sim_head="Transf_cls",
          clip_state_dict=fake_clip_weights,
          num_frames=4,
      )
      out3 = model3(x)
      # print(type(model3.transformer), out3.shape)
      self.assertTrue(isinstance(model3.transformer, TAggregate))
      self.assertTrue(out3.shape == (1, 8))
  
      model4 = VisualPrompt(
          sim_head="Conv_1D",
          clip_state_dict=fake_clip_weights,
          num_frames=4,
      )
      out4 = model4(x)
      # print(type(model4.shift), out4.shape)
      self.assertTrue(isinstance(model4.shift, torch.nn.Conv1d))
      self.assertTrue(out4.shape == (1, 8))
  
imports: import unittest
  import torch
  from collections import OrderedDict
  from towhee.models.action_clip.visual_prompt import TAggregate, VisualPrompt, TemporalTransformer
label_desc: Use image node_id 2 for calling the TestPrompt obj's underlying member method code with example usage: obj.test_visual_prompt_lstm() without return types