class_docstr: This corresponds to the expansion and depthwise convolution phase of each block in the original implementation.
  
  Args:
      config ([`EfficientNetConfig`]):
          Model configuration class.
      in_dim (`int`):
          Number of input channels.
      out_dim (`int`):
          Number of output channels.
      stride (`int`):
          Stride size to be used in convolution layers.
      expand_ratio (`int`):
          Expand ratio to set the output dimensions for the expansion and squeeze-excite layers.
      kernel_size (`int`):
          Kernel size for the depthwise convolution layer.
      drop_rate (`float`):
          Dropout rate to be used in the final phase of each block.
      id_skip (`bool`):
          Whether to apply dropout and sum the final hidden states with the input embeddings during the final phase
          of each block. Set to `True` for the first block of each stage.
      adjust_padding (`bool`):
          Whether to apply padding to only right and bottom side of the input kernel before the depthwise convolution
          operation, set to `True` for inputs with odd input sizes.
class_docstr_tok: ["This","corresponds","to","the","expansion","and","depthwise","convolution","phase","of","each","block","in","the","original","implementation",".","Args",":","config","(","[","`","EfficientNetConfig","`","]",")",":","Model","configuration","class",".","in_dim","(","`","int","`",")",":","Number","of","input","channels",".","out_dim","(","`","int","`",")",":","Number","of","output","channels",".","stride","(","`","int","`",")",":","Stride","size","to","be","used","in","convolution","layers",".","expand_ratio","(","`","int","`",")",":","Expand","ratio","to","set","the","output","dimensions","for","the","expansion","and","squeeze-excite","layers",".","kernel_size","(","`","int","`",")",":","Kernel","size","for","the","depthwise","convolution","layer",".","drop_rate","(","`","float","`",")",":","Dropout","rate","to","be","used","in","the","final","phase","of","each","block",".","id_skip","(","`","bool","`",")",":","Whether","to","apply","dropout","and","sum","the","final","hidden","states","with","the","input","embeddings","during","the","final","phase","of","each","block",".","Set","to","`","True","`","for","the","first","block","of","each","stage",".","adjust_padding","(","`","bool","`",")",":","Whether","to","apply","padding","to","only","right","and","bottom","side","of","the","input","kernel","before","the","depthwise","convolution","operation",",","set","to","`","True","`","for","inputs","with","odd","input","sizes","."]
code: def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor:
      embeddings = hidden_states
      # Expansion and depthwise convolution phase
      if self.expand_ratio != 1:
          hidden_states = self.expansion(hidden_states)
      hidden_states = self.depthwise_conv(hidden_states)
  
      # Squeeze and excite phase
      hidden_states = self.squeeze_excite(hidden_states)
      hidden_states = self.projection(embeddings, hidden_states)
      return 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 EfficientNetBlock obj's underlying member method code with example usage: obj.forward(hidden_states) and returns: hidden_states