functions do not work well with noisy gaze measurement. A measured gaze position is not static but continuously quivers in a small spatial range, even during fixation, and conventional loss functions are sensitive to small fluctuations of gaze. This observation motivates us to propose a new loss function, where the loss of pixels within small distance from the measured gaze position is down-weighted. More concretely, we modify the Binary Cross-Entropy loss function ($\mathcal{L}_{bce}$) across all the $N$ pixels with the weighting term $1+d_i$ as: $$\label{equa:2df}
    \mathcal{L}_{f}(G,\hat{G}) = -\frac{1}{N}\sum_{i=1}^{N}(1+d_i)\big\{\hat{G}[i]\cdot log(G[i]) + (1-\hat{G}[i])\cdot log(1-G[i])\big\}$$ where $d_i$ is the euclidean distance between ground truth gaze position and the pixel $i$, normalized by the image width.

For training the fixation state predictor in the attention transition module, we treat the fixation prediction of each frame as a binary classification problem. Thus, we use the Binary Cross-Entropy loss function for training the fixation state predictor. For training the LSTM-based weight predictor in the attention transition module, we use the mean squared error loss function across all the $n$ channels: $$\mathcal{L}_{mse} (w_t, \hat{w_t}) = \frac{1}{n}\sum_{i=1}^n(w_t[i] - \hat{w_t}[i])^2$$ where $w_t[i]$ denotes the i-th element of $w_t$.

Implementation details {#details}
----------------------

We describe the network structure and training 