# FSRFNet: Feature-selective and Spatial Receptive Fields Networks
## 3 Feature-selective and Spatial Receptive Fields (FSRF) Blocks
### Interactions between Feature-selective and Spatial Attention  
In order to take advantage of the information aggregated in the AMC and AMS attention building blocks, we conduct a soft attention across channels that achieves interactions between feature-selective and spatial attention. Firstly, a SoftMax operator is applied on the channel-wise digits at the output of the AMC building block:  
\[a_{c}=\frac{e^{\mathrm{A}_{c}s}}{e^{\mathrm{A}_{c}s}+e^{\mathrm{R}_{c}s}},\,b_ {c}=\frac{e^{\mathrm{B}_{c}s}}{e^{\mathrm{A}_{c}s}+e^{\mathrm{B}_{c}s}} \tag{12}\]  
Similarly, a SoftMax operator is applied on the channel-wise digits at the output of the AMS building block:  
\[c_{c}=\frac{e_{c}\mathrm{n}}{e^{\mathrm{J}_{c}n}+e^{\mathrm{K}_{c}n}},\,d_{c}= \frac{e^{\mathrm{K}_{c}n}}{e^{\mathrm{J}_{c}n}+e^{\mathrm{K}_{c}n}} \tag{13}\]  
where \(\mathrm{A},\mathrm{B},\mathrm{J},\mathrm{K}\in\mathbb{R}^{C\times\widehat{ \mathrm{C}}}\), \(a\) and \(c\) denote the vector for \(\overline{\mathrm{U}}\), and \(b\) and \(d\) denote the vector for \(\widetilde{\mathrm{U}}\). Note that \(a_{c}\) is the \(c\)-th element of \(a\) and \(\mathrm{A}_{c}\in\mathbb{R}^{1\times\widehat{\mathrm{C}}}\) is the \(c\)-th row of \(A\); likewise for \(b_{c}\), \(\mathrm{B}_{c}\), \(c_{c}\), \(\mathrm{J}_{c}\), \(d_{c}\) and \(\mathrm{K}_{c}\).  
A simple sigmoid operator is applied on the channel-wise digits at the output of the AMC building block:  
\[e_{c}=\sigma(\mathrm{s}_{c}) \tag{14}\]  
Similarly, a simple sigmoid operator is applied on the channel-wise digits at the output of the AMS building block:  
\[f_{c}=\sigma(\mathrm{n}_{c}) \tag{15}\]  
The feature maps \(\overline{\mathrm{Y}}\), \(\hat{\mathrm{Y}}\) and \(\overline{\mathrm{Y}}\) are obtained by rescaling the transformation output \(\overline{\mathrm{U}}\), \(\mathrm{U}\) and \(\widetilde{\mathrm{U}}\) with the activations:  
\[\begin{array}{l}\overline{\mathrm{Y}}_{c}=\mathrm{F}_{mul}(\overline{ \mathrm{u}}_{c},a_{c},c_{c})=\overline{\mathrm{u}}_{c}\cdot a_{c}\cdot c_{c} \\ \hat{\mathrm{Y}}_{c}=\mathrm{F}_{mul}(\mathrm{u}_{c},e_{c},f_{c})=\mathrm{u}_{c }\cdot e_{c}\cdot f_{c}\\ \overline{\mathrm{Y}}_{c}=\mathrm{F}_{mul}(\overline{\mathrm{u}}_{c},b_{c},d_{c })=\overline{\mathrm{u}}_{c}\cdot b_{c}\cdot d_{c}\end{array} \tag{16}\]  
where \(\overline{\mathrm{Y}}=\left[\overline{\mathrm{Y}}_{1},\overline{\mathrm{Y}}_{2 },\ldots,\overline{\mathrm{Y}}_{c}\right]\), \(\overline{\mathrm{Y}}_{c}\in\mathbb{R}^{H\times W}\) and likewise for \(\hat{\mathrm{Y}}\) and \(\overline{\mathrm{Y}}\). \(\mathrm{F}_{mul}(\overline{\mathrm{u}}_{c},a_{c},c_{c})\) refers to channel-wise multiplication between the scalar \(a_{c}\), \(c_{c}\) and the feature map \(\overline{\mathrm{u}}_{c}\), and likewise for \(\mathrm{F}_{mul}(\mathrm{u}_{c},e_{c},f_{c})\) and \(\mathrm{F}_{mul}(\overline{\mathrm{u}}_{c},b_{c},d_{c})\). The final feature map \(\mathrm{Y}\) is obtained by the element-wise summation of the vectors \(\overline{\mathrm{Y}}\), \(\hat{\mathrm{Y}}\) and \(\mathrm{Y}\):  
\[\mathrm{Y}_{c}=\overline{\mathrm{Y}}+\hat{\mathrm{Y}}+\overline{\mathrm{Y}}= \overline{\mathrm{u}}_{c}\cdot a_{c}\cdot c_{c}+\mathrm{u}_{c}\cdot e_{c}\cdot f _{c}+\overline{\mathrm{u}}_{c}\cdot b_{c}\cdot d_{c},\,a_{c}+b_{c}=1,\,\,c_{c}+d _{c}=1 \tag{17}\]where \(\mathrm{Y}=[Y_{1},Y_{2},\ldots,Y_{c}]\), \(\mathrm{Y}_{c}\in\mathbb{R}^{H\times W}\).