class_docstr: MobileViT block mentioned in MobileViT.
  
  Args:
      dim: input dimension of Transformer.
      depth: depth of Transformer.
      channel: input channel.
      kernel_size: kernel size.
      patch_size: patch size for folding and unfloding.
      mlp_dim: dimension of the FeedForward layer in Transformer.
      dropout: dropout ratio, defaults to 0.
class_docstr_tok: ["MobileViT","block","mentioned","in","MobileViT",".","Args",":","dim",":","input","dimension","of","Transformer",".","depth",":","depth","of","Transformer",".","channel",":","input","channel",".","kernel_size",":","kernel","size",".","patch_size",":","patch","size","for","folding","and","unfloding",".","mlp_dim",":","dimension","of","the","FeedForward","layer","in","Transformer",".","dropout",":","dropout","ratio",",","defaults","to","0","."]
code: def __init__(
      self,
      dim: int,
      depth: int,
      channel: int,
      kernel_size: int,
      patch_size: Tuple[int, int],
      mlp_dim: int,
      dropout: float = 0.0,
  ) -> None:
      super().__init__()
      self.ph, self.pw = patch_size
  
      self.conv1 = conv_nxn_bn(channel, channel, kernel_size)
      self.conv2 = conv_1x1_bn(channel, dim)
  
      self.transformer = Transformer(dim, depth, 4, 8, mlp_dim, dropout)
  
      self.conv3 = conv_1x1_bn(dim, channel)
      self.conv4 = conv_nxn_bn(2 * channel, channel, kernel_size)
  
imports: from typing import Any, Dict, Tuple
  import torch
  from torch import nn
  from kornia.core import Module, Tensor
label_desc: Use image node_id 1 to create a new MobileViTBlock object from inherited base classes: Module with example: obj = MobileViTBlock(dim, depth, channel, kernel_size, patch_size, mlp_dim, dropout)