class_docstr: Adds adapters to the T5Model class.
class_docstr_tok: ["Adds","adapters","to","the","T5Model","class","."]
code: def iter_layers(self) -> Iterable[Tuple[int, nn.Module]]:
      global_i = 0
      if hasattr(self, "encoder"):
          global_i = len(self.encoder.block)
          for i, layer in enumerate(self.encoder.block):
              yield i, layer
      if hasattr(self, "decoder"):
          for i, layer in enumerate(self.decoder.block, start=global_i):
              yield i, layer
  
imports: from typing import Iterable, Optional, Tuple
  import torch
  import torch.nn
  from ...methods.bottleneck import BottleneckLayer
  from ...methods.lora import LoRALinear
  from ...methods.prefix_tuning import PrefixTuningLayer
  from ...model_mixin import EmbeddingAdaptersMixin, InvertibleAdaptersMixin, InvertibleAdaptersWrapperMixin, ModelBaseAdaptersMixin, ModelWithHeadsAdaptersMixin
label_desc: Use image node_id 1 for calling the T5ModelAdaptersMixin obj's underlying member method code with example usage: obj.iter_layers() without return types