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 __init__(self, dim, k=3):
      super(ConvPosEnc, self).__init__()
      self.proj = nn.Conv2d(dim, dim, k, 1, k // 2, groups=dim)
  
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 1 to create a new ConvPosEnc object from inherited base classes: nn with example: obj = ConvPosEnc(dim, k)