code: def forward(
      self,
      pixel_values: torch.FloatTensor = None,
      output_hidden_states: Optional[bool] = None,
      return_dict: Optional[bool] = None,
  ) -> Union[Tuple, BaseModelOutputWithPoolingAndNoAttention]:
      output_hidden_states = (
          output_hidden_states
          if output_hidden_states is not None
          else self.config.output_hidden_states
      )
      return_dict = (
          return_dict
          if return_dict is not None
          else self.config.use_return_dict
      )
  
      if pixel_values is None:
          raise ValueError("You have to specify pixel_values")
  
      embedding_output = self.embeddings(pixel_values)
  
      encoder_outputs = self.encoder(
          embedding_output,
          output_hidden_states=output_hidden_states,
          return_dict=return_dict,
      )
      # Apply pooling
      last_hidden_state = encoder_outputs[0]
      pooled_output = self.pooler(last_hidden_state)
      # Reshape (batch_size, 1280, 1 , 1) -> (batch_size, 1280)
      pooled_output = pooled_output.reshape(pooled_output.shape[:2])
  
      if not return_dict:
          return (last_hidden_state, pooled_output) + encoder_outputs[
              1:
          ]
  
      return BaseModelOutputWithPoolingAndNoAttention(
          last_hidden_state=last_hidden_state,
          pooler_output=pooled_output,
          hidden_states=encoder_outputs.hidden_states,
      )
  
imports: import math
  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_efficientnet import EfficientNetConfig
label_desc: Use image node_id 2 for calling the EfficientNetModel obj's underlying member method code with example usage: obj.forward(pixel_values, output_hidden_states, return_dict) and returns: BaseModelOutputWithPoolingAndNoAttention, unknown