where \(i\)  denotes the layer number, \(R^{(0)} = R\) , and \(\text{Attn}(\cdot )\)  is the multi-head attention network introduced in [1]}. We choose
the outputs of an intermediate layer \(R^{(i_m)}\)  to predict the BOC \(m\) , and the outputs of the final layer \(R^{(n)}\)  to predict the caption \(y\) .
