class_docstr: Convolutional Position Encoding. 
  Note: This module is similar to the conditional position encoding in CPVT.
class_docstr_tok: ["Convolutional","Position","Encoding",".","Note",":","This","module","is","similar","to","the","conditional","position","encoding","in","CPVT","."]
code: def forward(self, x, size: Tuple[int, int]):
      B, N, C = x.shape
      H, W = size
      _assert(N == 1 + H * W, "")
  
      # Extract CLS token and image tokens.
      cls_token, img_tokens = (
          x[:, :1],
          x[:, 1:],
      )  # [B, 1, C], [B, H*W, C]
  
      # Depthwise convolution.
      feat = img_tokens.transpose(1, 2).view(B, C, H, W)
      x = self.proj(feat) + feat
      x = x.flatten(2).transpose(1, 2)
  
      # Combine with CLS token.
      x = torch.cat((cls_token, x), dim=1)
  
      return x
  
imports: from functools import partial
  from typing import Tuple, List, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import PatchEmbed, Mlp, DropPath, to_2tuple, trunc_normal_, _assert, LayerNorm
  from ._builder import build_model_with_cfg
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 2 for calling the ConvPosEnc obj's underlying member method code with example usage: obj.forward(x, size) and returns: x