class_docstr: ResNet Embeddings (stem) composed of a single aggressive convolution.
class_docstr_tok: ["ResNet","Embeddings","(","stem",")","composed","of","a","single","aggressive","convolution","."]
code: def forward(self, pixel_values: Tensor) -> 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."
          )
      embedding = self.embedder(pixel_values)
      embedding = self.pooler(embedding)
      return embedding
  
imports: from typing import Optional
  import torch
  import torch.utils.checkpoint
  from torch import Tensor, nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BackboneOutput, 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, replace_return_docstrings
  from ...utils.backbone_utils import BackboneMixin
  from .configuration_resnet import ResNetConfig
label_desc: Use image node_id 2 for calling the ResNetEmbeddings obj's underlying member method code with example usage: obj.forward(pixel_values) and returns: embedding