class_docstr: A module which performs QKV attention. Matches legacy QKVAttention + input/ouput heads shaping
class_docstr_tok: ["A","module","which","performs","QKV","attention",".","Matches","legacy","QKVAttention","+","input\/ouput","heads","shaping"]
code: def __init__(self, n_heads):
      super().__init__()
      self.n_heads = n_heads
  
imports: import math
  from abc import abstractmethod
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from .nn import avg_pool_nd
  from .nn import checkpoint
  from .nn import conv_nd
  from .nn import linear
  from .nn import normalization
  from .nn import SiLU
  from .nn import timestep_embedding
  from .nn import zero_module
label_desc: Use image node_id 1 to create a new QKVAttentionLegacy object from inherited base classes: nn with example: obj = QKVAttentionLegacy(n_heads)