code: def __init__(self, dim: int, k: int = 3, act: bool = False):
      super(ConvPosEnc, self).__init__()
  
      self.proj = nn.Conv2d(dim, dim, k, 1, k // 2, groups=dim)
      self.act = nn.GELU() if act else nn.Identity()
  
imports: from functools import partial
  from typing import Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import DropPath, to_2tuple, trunc_normal_, Mlp, LayerNorm2d, get_norm_layer, use_fused_attn
  from timm.layers import NormMlpClassifierHead, ClassifierHead
  from ._builder import build_model_with_cfg
  from ._features_fx import register_notrace_function
  from ._manipulate import checkpoint_seq
  from ._registry import generate_default_cfgs, register_model
label_desc: Use image node_id 1 to create a new ConvPosEnc object from inherited base classes: nn with example: obj = ConvPosEnc(dim, k, act)