Nowadays, the number of sudden deaths due to heart disease is increasing with the Coronavirus pandemic. Thus, Electrocardiogram (ECG) signals automatic classification is of vital importance for diagnosis and treatment. Thanks to deep learning algorithms, the classification can be performed without manual feature extraction. In this study, we propose a novel convolutional neural networks (CNN) architecture. Further, the proposed CNN can be extracted automatic features from images. Here, we classify a real ECC data set using our proposed CNN that includes 34 layers. While this dataset is one-dimensional signals, these are transformed into two-dimensional scalograms by continuous wavelet transform (CWT). In addition, we compare it with well-known architectures: AlexNet and SqueezeNet. When we classify ECG scalograms with proposed CNN, we find it more effectively than others. Although the results are very good, we benefit from support vector machines (SVM). Essentially, our main aim is to achieve the best classification results on account of health. Thus, we modify the proposed CNN with SVM. As a result, we achieve the highest success with an accuracy of 99.21% from our proposed CNN-SVM.