The automatic detection and classification of cardiac abnormalities can assist physicians in making diagnoses, saving costs in modern healthcare systems. In this study we present an automatic algorithm for classification of cardiac abnormalities included in the CinC’s challenge 2021 dataset consisting of twelve-lead, six-lead, three-lead, and two-lead ECGs (team: Polimi_1). For each set of leads an ensemble of three deep learning models, trained on three different subsets, was developed. These subsets, obtained by splitting the recordings with the most frequent classes, had more balanced distributions for training and were used to train the 3 classifiers. An ensemble of the classifiers is then considered as ensembles usually achieve better generalization skills than individual models. The trained models were modified Residual Networks with a Squeeze-and-Excitation module. This module is based on the intuition of channel attention: the basic idea of this approach is to apply a weight to the Convolutional channels based on their relevance in learning before propagating to the next layer. For evaluation, we submitted our model to the official phase of the PhysioNet/Computing in Cardiology Challenge 2021. The model achieved the Challenge metric score 0.593, 0.577, 0.591, 0.595 and 0.582 on 12-lead, 6-lead, 4-lead, 3-lead, 2-lead validation datasets, respectively.