where \(i\)  indicates the channel index; \(D_{max}=128\) , and \(d=64\)  means the total channels of \(\mathbf {E}_{dis}\) , which is the same as the first convolution of FTR. Since SPE can only provide absolute positional information [1]}, \(\mathbf {E}_{dis}\)  can be further resized by the nearest interpolation to various scales during the training for learning relative positional information in arbitrary resolutions.
For masking directions, we use 4 different binary kernels to get the 4-channel one-hot vector \(\mathbf {D}_{dir}\in \mathbb {R}^{256\times 256\times 4}\) . Values of \(\mathbf {D}_{dir}\)  depend on which kernel covers the masked regions firstly. \(\mathbf {D}_{dir}\)  shows the nearest direction from a masked position to an unmasked one as shown in Fig. REF (c).
Note that the masking direction is a multi-label vector, because a pixel may have more than one shortest direction. Then \(\mathbf {D}_{dir}\)  is projected to a \(d\)  dimension features with learnable embedding parameters \(\mathbf {W}_{dir}\in \mathbb {R}^{4\times d}\)  as
\(\mathbf {E}_{dir}=\mathbf {D}_{dir}\times \mathbf {W}_{dir}\in \mathbb {R}^{256\times 256\times d}.\) 
