For feature extraction, the input text crops are scaled to fixed height of 24 while maintaining the aspect ratio. The residue convolutional blocks are stacked with the spatial attention block being introduced after the 1st and 2nd block as shown in Figure REF . The filter size, stride and padding size of all the convolutional layers is 3, 1 and 1 respectively and each convolutional layers is followed by a max-pooling layer. The output filter size for the convolutional layers are 32, 64, 96, 128, 164, 196, 256 respectively and each layer is followed by the ReLU activation function. Batch normalization [1]} is adopted after the 3rd and the 5th convolutional layer, speeding up the training significantly. The input layer is followed by a 3 × 3-stride max-pool layer. This is followed by three residual blocks, with each unit consisting of two 3×3 convolution operations. The first residual block further downsample the feature maps with a 2 × 2-stride max-pool layer, while the last two residual blocks each employ a 2 × 1-stride max-pool layer to reduce the sizes of feature maps only in the height dimension. The two LSTMs of a BiLSTM layer in the encoder each have 256 hidden units for capturing dependencies in each direction of the feature sequence.
