class_docstr: This class is comparable to (and inspired by) the SwinEmbeddings class
  found in src/transformers/models/swin/modeling_swin.py.
class_docstr_tok: ["This","class","is","comparable","to","(","and","inspired","by",")","the","SwinEmbeddings","class","found","in","src\/transformers\/models\/swin\/modeling_swin.py","."]
code: def __init__(self, config):
      super().__init__()
      self.patch_embeddings = nn.Conv2d(
          config.num_channels,
          config.hidden_sizes[0],
          kernel_size=config.patch_size,
          stride=config.patch_size,
      )
      self.layernorm = ConvNextLayerNorm(
          config.hidden_sizes[0], eps=1e-6, data_format="channels_first"
      )
      self.num_channels = config.num_channels
  
imports: 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 ACT2FN
  from ...modeling_outputs import BaseModelOutputWithNoAttention, BaseModelOutputWithPoolingAndNoAttention, 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_convnext import ConvNextConfig
label_desc: Use image node_id 1 to create a new ConvNextEmbeddings object from inherited base classes: nn with example: obj = ConvNextEmbeddings(config)