code: def _create_modality_preprocessors(
      self,
      video_frames=2,
      vision_embed_dim=1024,
      kernel_size=(2, 14, 14),
      text_embed_dim=768,
      audio_embed_dim=768,
      audio_kernel_size=16,
      audio_stride=10,
      audio_num_mel_bins=128,
      audio_target_len=204,
      depth_embed_dim=768,
      depth_kernel_size=16,
      thermal_embed_dim=768,
      thermal_kernel_size=16,
      imu_embed_dim=512,
  ):
      rgbt_stem = PatchEmbedGeneric(
          proj_stem=[
              PadIm2Video(pad_type="repeat", ntimes=2),
              nn.Conv3d(
                  in_channels=3,
                  kernel_size=kernel_size,
                  out_channels=vision_embed_dim,
                  stride=kernel_size,
                  bias=False,
              ),
          ]
      )
      rgbt_preprocessor = RGBDTPreprocessor(
          img_size=[3, video_frames, 224, 224],
          num_cls_tokens=1,
          pos_embed_fn=partial(
              SpatioTemporalPosEmbeddingHelper, learnable=True
          ),
          rgbt_stem=rgbt_stem,
          depth_stem=None,
      )
  
      text_preprocessor = TextPreprocessor(
          context_length=77,
          vocab_size=49408,
          embed_dim=text_embed_dim,
          causal_masking=True,
      )
  
      audio_stem = PatchEmbedGeneric(
          proj_stem=[
              nn.Conv2d(
                  in_channels=1,
                  kernel_size=audio_kernel_size,
                  stride=audio_stride,
                  out_channels=audio_embed_dim,
                  bias=False,
              ),
          ],
          norm_layer=nn.LayerNorm(normalized_shape=audio_embed_dim),
      )
      audio_preprocessor = AudioPreprocessor(
          img_size=[1, audio_num_mel_bins, audio_target_len],
          num_cls_tokens=1,
          pos_embed_fn=partial(
              SpatioTemporalPosEmbeddingHelper, learnable=True
          ),
          audio_stem=audio_stem,
      )
  
      depth_stem = PatchEmbedGeneric(
          [
              nn.Conv2d(
                  kernel_size=depth_kernel_size,
                  in_channels=1,
                  out_channels=depth_embed_dim,
                  stride=depth_kernel_size,
                  bias=False,
              ),
          ],
          norm_layer=nn.LayerNorm(normalized_shape=depth_embed_dim),
      )
  
      depth_preprocessor = RGBDTPreprocessor(
          img_size=[1, 224, 224],
          num_cls_tokens=1,
          pos_embed_fn=partial(
              SpatioTemporalPosEmbeddingHelper, learnable=True
          ),
          rgbt_stem=None,
          depth_stem=depth_stem,
      )
  
      thermal_stem = PatchEmbedGeneric(
          [
              nn.Conv2d(
                  kernel_size=thermal_kernel_size,
                  in_channels=1,
                  out_channels=thermal_embed_dim,
                  stride=thermal_kernel_size,
                  bias=False,
              ),
          ],
          norm_layer=nn.LayerNorm(normalized_shape=thermal_embed_dim),
      )
      thermal_preprocessor = ThermalPreprocessor(
          img_size=[1, 224, 224],
          num_cls_tokens=1,
          pos_embed_fn=partial(
              SpatioTemporalPosEmbeddingHelper, learnable=True
          ),
          thermal_stem=thermal_stem,
      )
  
      imu_stem = PatchEmbedGeneric(
          [
              nn.Linear(
                  in_features=48,
                  out_features=imu_embed_dim,
                  bias=False,
              ),
          ],
          norm_layer=nn.LayerNorm(normalized_shape=imu_embed_dim),
      )
  
      imu_preprocessor = IMUPreprocessor(
          img_size=[6, 2000],
          num_cls_tokens=1,
          kernel_size=8,
          embed_dim=imu_embed_dim,
          pos_embed_fn=partial(
              SpatioTemporalPosEmbeddingHelper, learnable=True
          ),
          imu_stem=imu_stem,
      )
  
      modality_preprocessors = {
          ModalityType.VISION: rgbt_preprocessor,
          ModalityType.TEXT: text_preprocessor,
          ModalityType.AUDIO: audio_preprocessor,
          ModalityType.DEPTH: depth_preprocessor,
          ModalityType.THERMAL: thermal_preprocessor,
          ModalityType.IMU: imu_preprocessor,
      }
  
      return nn.ModuleDict(modality_preprocessors)
  
file_path: imagebind/imagebind/models/imagebind_model.py
imports: import os
  from functools import partial
  from types import SimpleNamespace
  import torch
  import torch.nn
  from imagebind.models.helpers import EinOpsRearrange, LearnableLogitScaling, Normalize, SelectElement, SelectEOSAndProject
  from imagebind.models.multimodal_preprocessors import AudioPreprocessor, IMUPreprocessor, PadIm2Video, PatchEmbedGeneric, RGBDTPreprocessor, SpatioTemporalPosEmbeddingHelper, TextPreprocessor, ThermalPreprocessor
  from imagebind.models.transformer import MultiheadAttention, SimpleTransformer
label_desc: Use image node_id 2 for calling the ImageBindModel obj's underlying member method code with example usage: obj._create_modality_preprocessors(video_frames, vision_embed_dim, kernel_size, text_embed_dim, audio_embed_dim, audio_kernel_size, audio_stride, audio_num_mel_bins, audio_target_len, depth_embed_dim, depth_kernel_size, thermal_embed_dim, thermal_kernel_size, imu_embed_dim) and returns: nn