I’m still unsure what n stands for, and the highlighted part doesn’t seem to be drawn in the figure.
However, since SR*b*b represent the channels in the output of Conv_phi, I assume b*b represent the channel dimension of the output of Conv_px.
If that’s the case, nn.Conv2d(SR*b*b, b*b*, kernel_size, stride, padding) should work.