class_docstr: ### 🚧 Down-sampling with attention
  
  egin{align}
  x' &= S(x) + Attention \Big(Q=S(x),K = x, V =x \Big) \
  x' &= x' + FFN(x')
  \end{align}
  
  where $S(x)$ is average pooling or linear pooling.
code: def __init__(self):
      super().__init__()
      raise NotImplementedError
  
imports: from typing import List
  import torch
  from torch import nn
  from labml_helpers.module import Module
  from labml_nn.transformers import MultiHeadAttention, TransformerLayer
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.utils import subsequent_mask
label_desc: Use image node_id 1 to create a new AttentionBasedShortening object from inherited base classes: Module with example: obj = AttentionBasedShortening()