class_docstr: Adapter for DPMultiHeadAttention.
  This module takes three inputs, but our testing tools need that the model is given a single
  tensor, and returns a single tensor in output.
  
  To adapt for this, we stack the three input tensors required (q, k, v) over the LAST dimension,
  because our testing tools need to handle the `batch_first` argument which will manipulate x
  over the first (and potentially second) dimension.
class_docstr_tok: ["Adapter","for","DPMultiHeadAttention",".","This","module","takes","three","inputs",",","but","our","testing","tools","need","that","the","model","is","given","a","single","tensor",",","and","returns","a","single","tensor","in","output",".","To","adapt","for","this",",","we","stack","the","three","input","tensors","required","(","q",",","k",",","v",")","over","the","LAST","dimension",",","because","our","testing","tools","need","to","handle","the","`","batch_first","`","argument","which","will","manipulate","x","over","the","first","(","and","potentially","second",")","dimension","."]
code: def __init__(self, *args, **kwargs):
      super().__init__()
      self.attn = DPMultiheadAttention(*args, **kwargs)
  
file_path: opacus/opacus/tests/grad_samples/dp_multihead_attention_test.py
imports: import hypothesis.strategies
  import torch
  import torch.nn
  from hypothesis import given, settings
  from opacus.layers import DPMultiheadAttention
  from .common import GradSampleHooks_test
label_desc: Use image node_id 1 to create a new DPMultiheadAttentionAdapter object from inherited base classes: nn with example: obj = DPMultiheadAttentionAdapter()