class_docstr: Linear attention operation from: https://arxiv.org/pdf/2006.16236.pdf
  Canonical implementation reference: https://github.com/idiap/fast-transformers/blob/master/fast_transformers/attention/linear_attention.py
  LoFTR implementation reference: https://github.com/zju3dv/LoFTR/blob/2122156015b61fbb650e28b58a958e4d632b1058/src/loftr/loftr_module/linear_attention.py
class_docstr_tok: ["Linear","attention","operation","from",":","https",":","\/\/arxiv.org\/pdf\/2006.16236.pdf","Canonical","implementation","reference",":","https",":","\/\/github.com\/idiap\/fast-transformers\/blob\/master\/fast_transformers\/attention\/linear_attention.py","LoFTR","implementation","reference",":","https",":","\/\/github.com\/zju3dv\/LoFTR\/blob\/2122156015b61fbb650e28b58a958e4d632b1058\/src\/loftr\/loftr_module\/linear_attention.py"]
code: def __init__(
      self,
      eps: float = 1e-6,
      feature_map_fn: Callable[[Tensor], Tensor] = elu_feature_map,
  ) -> None:
      super().__init__()
      self.eps = eps
      self.feature_map_fn = feature_map_fn
  
imports: import math
  from functools import partial
  from typing import Callable, Dict, Iterable, List, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torchvision.models.optical_flow.raft
  from torch import Tensor
  from torchvision.models._api import register_model, Weights, WeightsEnum
  from torchvision.models._utils import handle_legacy_interface
  from torchvision.models.optical_flow._utils import grid_sample, make_coords_grid, upsample_flow
  from torchvision.ops import Conv2dNormActivation
  from torchvision.prototype.transforms._presets import StereoMatching
label_desc: Use image node_id 1 to create a new LinearAttention object from inherited base classes: nn with example: obj = LinearAttention(eps, feature_map_fn)