Cardiac arrhythmia is associated with abnormal electrical activities of the heart that can be represented by the altered characteristics of electrocardiogram (ECG). Due to the simplicity and noninvasive nature, the standard 12-lead ECG has been widely applied to diagnose arrhythmias. Over the last decade, many attempts have been implemented for automatic detection of cardiac arrhythmias, however, their performance is still not ideal due to unreliable extracted features of designed model or limited small public datasets, therefore, it remains a challenge for automatic diagnosis of arrhythmias. In this study, we train a deep neural networks (DNNs) in order to identify eight arrhythmias. The constructed model combined residual convolutional modules and bidirectional Gated Recurrent Unit (BiGRU) layers to extract features from preprocessing ECG signals. With the mechanism of attention, the extracted features are concatenated to do the final classification. The algorithm is evaluated based on the test set of the PhysioNet/Computing in Cardiology Challenge 2020. The overall scores of Fβ and Gβ are 0.771 and 0.570 for the first unofficial phase, which demonstrates a good efficacy of our design that may have potential practical applications.