## 1 Introduction  
Skin lesions, which are irregular skin changes compared to the neighboring tissue, can evolve into skin cancer, one of the most dangerous cancers. There are two main types of skin cancer: nonmelanoma and melanoma. Melanoma lesions are responsible for the significant increase in mortality and morbidity in recent years; they are the most destructive and dangerous among various lesion types [1]. If the physicians detect the lesions earlier, they can increase the curing rate to 90% [2]. Moreover, visual inspection for skin cancer is complex because of high similarity among different skin lesion types (e.g., nonmelanoma and melanoma), leading to misdiagnosis. A solution for healthcare systems [3] and image inspection [4] is using the automatic classification of lesion pictures by machine learning (ML). Presently, 132,000 melanoma skin lesion cases and approximately three million nonmelanoma skin lesion cases occur yearly in the world. Furthermore, 60,000 people died due to prolonged sun exposure (12,000 nonmelanoma and 48,000 melanoma), according to the World Health Organization. Approximately 80% of skin cancer mortalities occur with melanoma lesions [5]. Besides long sun exposure, a record of sunburn has been linked to the development of skin cancer, especially melanoma. In the beginning grades, patient survival rates can be improved if melanoma is identified correctly [6]. To handle the interobservation differences, technicians are guided to recognize melanoma manually. Consequently, an automatic classification system can enhance the precision and efficiency of the early discovery of this cancer type. Melanoma is similar to benign moles in their early stages of development; thus, it is not easy to distinguish malignant and benign (even for qualified dermatologists [7]). Several methods have been proposed to solve these problems, including handcrafted and artificial intelligence (AI) approaches. First, low-level properties, such as border, color, and visual texture features. were used to separate melanoma and nonmelanoma lesions [8]. [PERSON] et al. [9] used shape, color, and texture features, but experiences with huge observed intraclass similarity led to low results. Segmentation is another approach to drop unwanted features and background, as presented in [10]. [PERSON] et al. [10] used a binary mask to segment the images and a support vector machine (SVM) to classify the segmented images. The segmentation process in [11] calculates the thresholding values using Gabor filter masks, which yields poor outcomes. The second approach is AI, an area with numerous possible utilizations, such as mining, ecology, urban planning. AI is subdivided into ML and deep learning (DL) [12]. ML builds algorithms to identify data and obtain predictions [13; 14; 15]. DL can study related features of images and extract the features with various architectures. Additionally, DL is highly efficient for big data investigation [16; 17; 18; 19; 20; 21; 22]. One of the DL prototypes is a convolutional neural network (CNN), which has presented an excellent performance in video and images processing with the development of graphics processing unit (GPU) computing systems. CNN is a powerful mechanism for bioimage examination based on a recent study [23; 24; 25]. Hence, it allows the high potential in melanoma classification [26; 27]. Moreover, CNN ensemble approaches have shown success for this classification task [28]. Skin cancer is extremely common, and early detection is crucial. Although computer-aided diagnostic tools have been extensively studied, they still lack clinical practice. ML (and particularly DL) models have demonstrated great promise in skin lesion classification tasks; however, some challenges limit their adoption: data availability for some lesion categories and the requirement of trained professionals handling equipment (e.g., dermatoscopy to collect and annotate the data). Thus, developing powerful but efficient models that can run in decentralized devices (e.g., smartphones) is critical.