dimensions represents focusing on different aspects of the video.

### Attention Operation Type

We consider two types of attention operations, each of which helps address a specific limitation of convolutional operations, as mentioned in the introduction:

-   **Map-based attention** [@Park2018BAMBA; @woo2018cbam]: Map-based attention learns a weighting factor for each position in the attention dimension and scales the feature map with the learned attention weights. Map-based attention explicitly models what positions in the attention dimension to attend to in videos.

-   **Dot-product attention** [@vaswani2017attention; @wang2018non; @bello2019attention]: A dot-product attention operation computes the feature response at a position as a weighted sum of features of all the positions in the attention dimension, where the weights are determined by a similarity function between features of all the positions [@wang2018non; @bello2019attention]. Dot-product attention explicitly models the long-range interactions among distant positions in the attention dimension.

We now describe the details of the two types of attention operations. Let $f_\text{in}$ denote the input feature map to an attention operation and denote its shape as $(T, H, W, C_{\text{in}})$. Applying an attention operation consists of three steps, including reshaping the input feature map $f_\text{in}$, computing the attention weights, and applying the attention weights.

#### Reshape $f_\text{in}$.

