docstr: FFT-based pseudo-attention mechanism, from
  "
  "FNet: Mixing Tokens with Fourier Transforms"
  Lee-Thorp et al., 2021, https://arxiv.org/pdf/2105.03824.pdf
docstr_tok: ["FFT-based","pseudo-attention","mechanism",",","from","''","''","FNet",":","Mixing","Tokens","with","Fourier","Transforms","''","Lee-Thorp","et","al.",",","2021",",","https",":","\/\/arxiv.org\/pdf\/2105.03824.pdf"]
code: def __init__(self, dropout: float, *_, **__):
      """
      FFT-based pseudo-attention mechanism, from
      "
      "FNet: Mixing Tokens with Fourier Transforms"
      Lee-Thorp et al., 2021, https://arxiv.org/pdf/2105.03824.pdf
      """
      super().__init__()
      self.attn_drop = torch.nn.Dropout(dropout, inplace=False)
  
      # Properties specific to this attention mechanism
      self.supports_attention_mask = False
      self.requires_input_projection = False
  
imports: import torch
  from torch.cuda.amp import autocast
  from xformers.components.attention import Attention, AttentionConfig, register_attention
label_desc: Use image node_id 1 to create a new FourierMix object from inherited base classes: Attention with example: obj = FourierMix(dropout)