class_docstr: Vision transformer basic head.
  ::
                                    SequencePool
                                         ↓
                                      Dropout
                                         ↓
                                     Projection
                                         ↓
                                     Activation
  Args:
      in_features ('int'):
          Input channel size of the resnet head.
      out_features ('int'):
          Output channel size of the resnet head.
      seq_pool_type ('str'):
          Pooling type. It supports "cls", "mean " and "none". If set to
          "cls", it assumes the first element in the input is the cls token and
          returns it. If set to "mean", it returns the mean of the entire sequence.
      activation ('callable'):
          A callable that constructs vision transformer head activation layer,
          examples include: nn.ReLU, nn.Softmax, nn.Sigmoid, and None (not applying activation).
      dropout_rate ('float'):
          Dropout rate.
code: def __init__(
      self,
      *,
      in_features,
      out_features,
      seq_pool_type="cls",
      dropout_rate=0.5,
      activation=None,
  ) -> None:
      super().__init__()
      assert seq_pool_type in ["cls", "mean", "none"]
  
      if seq_pool_type in ["cls", "mean"]:
          self.seq_pool_model = SequencePool(seq_pool_type)
      elif seq_pool_type == "none":
          self.seq_pool_model = None
      else:
          raise NotImplementedError
  
      if activation is None:
          self.activation_model = None
      elif activation == nn.Softmax:
          self.activation_model = self.activation(dim=1)
      else:
          self.activation_model = self.activation()
      self.dropout = (
          nn.Dropout(dropout_rate) if dropout_rate > 0.0 else None
      )
      self.proj = nn.Linear(in_features, out_features)
  
imports: import torch
  from torch import nn
  from towhee.models.layers.sequence_pool import SequencePool
label_desc: Use image node_id 1 to create a new VisionTransformerBasicHead object from inherited base classes: nn with example: obj = VisionTransformerBasicHead()