class_docstr: Based on timm and DeiT code bases
  https://github.com/rwightman/pytorch-image-models/tree/master/timm
  https://github.com/facebookresearch/deit/
class_docstr_tok: ["Based","on","timm","and","DeiT","code","bases","https",":","\/\/github.com\/rwightman\/pytorch-image-models\/tree\/master\/timm","https",":","\/\/github.com\/facebookresearch\/deit\/"]
code: def forward_features(self, x):
      B = x.shape[0]
  
      # Patch embedding
      x, (Hp, Wp) = self.patch_embed(x)
      if self.use_pos:
          pos_encoding = self._get_pos_encoding(B, Hp, Wp, x)
          x = x + pos_encoding
      x = self.pos_drop(x)
  
      # Go through the XCA blocks
      for blk in self.blocks:
          x = blk(x, Hp, Wp)
  
      # Add the class token and go through the class attention blocks
      x = self._add_class_token(x)
      for blk in self.cls_attn_blocks:
          x = blk(x, Hp, Wp)
  
      # Select the class token and returns it
      x = self.norm(x)[:, 0]
      return x
  
imports: import logging
  import math
  from functools import partial
  from typing import List, Optional
  import torch
  import torch.nn
  from fairscale.nn import checkpoint_wrapper
  from vissl.config import AttrDict
  from vissl.models.model_helpers import DropPath, to_2tuple, trunc_normal_
  from vissl.models.trunks import register_model_trunk
  from vissl.models.trunks.vision_transformer import Mlp
  from vissl.utils.fsdp_utils import fsdp_wrapper
  from vissl.utils.misc import set_torch_seed
label_desc: Use image node_id 10 for calling the XCiT obj's underlying member method code with example usage: obj.forward_features(x) and returns: x