src/transformers/models/efficientformer/modeling_efficientformer.py/EfficientFormerMeta3DLayers/forward
class EfficientFormerMeta3DLayers:    def forward(self, hidden_states: torch.Tensor, output_attentions: bool = False) -> Tuple[torch.Tensor]:
        all_attention_outputs = () if output_attentions else None
        for layer_module in self.blocks:
            if isinstance(hidden_states, tuple):
                hidden_states = hidden_states[0]
            hidden_states = layer_module(hidden_states, output_attentions)
            if output_attentions:
                all_attention_outputs = all_attention_outputs + (hidden_states[1],)
        if output_attentions:
            outputs = (hidden_states[0],) + all_attention_outputs
            return outputs
        return hidden_states