<span lang="EN-US">One reliable way of detecting coronavirus disease 2019 (COVID-19) is using a chest x-ray image due to its complications in the lung parenchyma. This paper proposes a solution for COVID-19 detection in chest x-ray images based on a convolutional neural network (CNN). This CNN-based solution is developed using a modified InceptionV3 as a backbone architecture. Self-attention layers are inserted to modify the backbone such that the number of trainable parameters is reduced and meaningful areas of COVID-19 in chest x-ray images are focused on a training process. The proposed CNN architecture is then learned to construct a model to classify COVID-19 cases from non-COVID-19 cases. It achieves sensitivity, specificity, and accuracy values of 93%, 96%, and 96%, respectively. The model is also further validated on the so-called other normal and abnormal, which are non-COVID-19 cases. Cases of other normal contain chest x-ray images of elderly patients with minimal fibrosis and spondylosis of the spine, whereas other abnormal cases contain chest x-ray images of tuberculosis, pneumonia, and pulmonary edema. The proposed solution could correctly classify them as non-COVID-19 with 92% accuracy. This is a practical scenario where non-COVID-19 cases could cover more than just a normal condition.</span>