class_docstr: ActionClip model.
  
  Args:
      - clip_model (`nn.Module`):
          CLIP model
      - visual_prompt (`nn.Module`):
          Visual prompt.
      - text_prompt_flat (`bool`):
          Flag to control whether to use text prompt.
code: def encode_video(self, video: torch.Tensor):
      b, t, c, h, w = video.size()
      frames = video.view(-1, c, h, w)
      if hasattr(self.clip_model, "encode_image"):
          frame_features = self.clip_model.encode_image(frames)
      else:
          frame_features = self.clip_model(frames)
      image_features = frame_features.view(b, t, -1)
      if self.visual_prompt:
          visual_features = self.visual_prompt(image_features)
      else:
          visual_features = image_features
      return visual_features
  
file_path: towhee/towhee/models/action_clip/action_clip.py
imports: from typing import Union
  import torch.cuda
  from torch import nn
  from towhee.models import clip
  from towhee.models.action_clip.action_clip_utils import map_state_dict, get_configs
  from towhee.models.action_clip.text_prompt import text_prompt
  from towhee.models.action_clip.visual_prompt import VisualPrompt
label_desc: Use image node_id 2 for calling the ActionClip obj's underlying member method code with example usage: obj.encode_video(video) and returns: visual_features