class_docstr: `SwiftFormerConvEncoder` with 3*3 and 1*1 convolutions.
  
  Input: tensor of shape `[batch_size, channels, height, width]`
  
  Output: tensor of shape `[batch_size, channels, height, width]`
class_docstr_tok: ["`","SwiftFormerConvEncoder","`","with","3","*","3","and","1","*","1","convolutions",".","Input",":","tensor","of","shape","`","[","batch_size",",","channels",",","height",",","width","]","`","Output",":","tensor","of","shape","`","[","batch_size",",","channels",",","height",",","width","]","`"]
code: def __init__(self, config: SwiftFormerConfig, dim: int):
      super().__init__()
      hidden_dim = int(config.mlp_ratio * dim)
  
      self.depth_wise_conv = nn.Conv2d(
          dim, dim, kernel_size=3, padding=1, groups=dim
      )
      self.norm = nn.BatchNorm2d(dim, eps=config.batch_norm_eps)
      self.point_wise_conv1 = nn.Conv2d(dim, hidden_dim, kernel_size=1)
      self.act = nn.GELU()
      self.point_wise_conv2 = nn.Conv2d(hidden_dim, dim, kernel_size=1)
      self.drop_path = nn.Identity()
      self.layer_scale = nn.Parameter(
          torch.ones(dim).unsqueeze(-1).unsqueeze(-1),
          requires_grad=True,
      )
  
imports: import collections.abc
  from typing import Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2CLS
  from ...modeling_outputs import BaseModelOutputWithNoAttention, ImageClassifierOutputWithNoAttention
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from .configuration_swiftformer import SwiftFormerConfig
label_desc: Use image node_id 1 to create a new SwiftFormerConvEncoder object from inherited base classes: nn with example: obj = SwiftFormerConvEncoder(config, dim)