Introduction: The electrocardiogram (ECG) is the most common diagnostic tool for screening cardiovascular diseases. PhysioNet/Computing in Cardiology Challenge 2021 aims to classify cardiac abnormalities from twelve-lead, six-lead, four-lead, three-lead, and two-lead ECGs. Methods: ECGs were downsampled to 250 Hz and then applied with a bandpass filter to reduce noise. The unscored label named ventricular ectopics was transformed to premature ventricular contractions. The ECGs labled as af in the Ningbo Database were relabeled as afl or af. All ECGs were randomly shuffled and divided into a training set and a validation set at 4:1. Five models based on a deep residual convolutional neural network were proposed to make classification from different dimensions of ECGs. A novel loss calculation method was proposed to balance the different labeling tendency of different source data sets. Results: After training, the performance of five models was evaluated on the local validation set and got the challenge metric of 0.610, 0.595, 0.610, 0.612, and 0.589 on twelve-lead, six-lead, four-lead, three-lead, and two-lead ECGs, respectively. Our team, USST_Med, received a test score of 0.597, 0.583, 0.536, 0.552, and 0.535 on five test datasets, respectively. Conclusion: The proposed models performed well on classifying ECGs and have potential for clinical application.