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 forward(self, pixel_values: torch.FloatTensor) -> torch.Tensor:
      num_channels = pixel_values.shape[1]
      if num_channels != self.num_channels:
          raise ValueError(
              "Make sure that the channel dimension of the pixel values match with the one set in the configuration."
          )
      embeddings = self.patch_embeddings(pixel_values)
      embeddings = self.layernorm(embeddings)
      return embeddings
  
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 2 for calling the ConvNextEmbeddings obj's underlying member method code with example usage: obj.forward(pixel_values) and returns: embeddings