class_docstr: Adds adapters to the T5Block module.
class_docstr_tok: ["Adds","adapters","to","the","T5Block","module","."]
code: def init_adapters(self, model_config, adapters_config):
      location_key = "self" if self.is_decoder else "encoder"
      self.layer[0].SelfAttention.location_key = location_key
      self.layer[-1].location_key = location_key
  
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 T5BlockAdaptersMixin obj's underlying member method code with example usage: obj.init_adapters(model_config, adapters_config) without return types