class_docstr: Adds adapters to the EncoderDecoderModel class.
class_docstr_tok: ["Adds","adapters","to","the","EncoderDecoderModel","class","."]
code: def iter_layers(self) -> Iterable[Tuple[int, nn.Module]]:
      # Can't count the layers globally, because then saving and loading pretrained models won't work
      for i, layer in self.encoder.iter_layers():
          yield i, layer
  
      for i, layer in self.decoder.iter_layers():
          yield i, layer
  
file_path: adapters/src/adapters/models/encoder_decoder/mixin_encoder_decoder.py
imports: from typing import Iterable, Tuple
  import torch.nn
  import adapters
  from ...model_mixin import EmbeddingAdaptersMixin, InvertibleAdaptersMixin, ModelAdaptersMixin, ModelUsingSubmodelsAdaptersMixin
label_desc: Use image node_id 3 for calling the EncoderDecoderModelAdaptersMixin obj's underlying member method code with example usage: obj.iter_layers() without return types