class_docstr: A module which performs QKV attention. Matches legacy QKVAttention + input/output heads shaping
class_docstr_tok: ["A","module","which","performs","QKV","attention",".","Matches","legacy","QKVAttention","+","input\/output","heads","shaping"]
code: def __init__(self, n_heads):
      super().__init__()
      self.n_heads = n_heads
  
imports: import functools
  import math
  import os
  import fsspec
  import torch
  import torch.nn
  import torch.nn.functional
  import torchaudio
  from transformers import LogitsWarper
  from TTS.tts.layers.tortoise.xtransformers import ContinuousTransformerWrapper, RelativePositionBias
label_desc: Use image node_id 1 to create a new QKVAttentionLegacy object from inherited base classes: nn with example: obj = QKVAttentionLegacy(n_heads)