Skin cancer is a dangerous disease. The most common skin cancers in Indonesia is melanoma. Melanoma cases reached 9,6 million in 2018. Skin cancer can be cured with proper and quick treatment. Skin cancer early detection can be done by detection system types of skin cancer based on benign and malignant classes using Convolutional Neural Network (CNN) with ResNet-152 and AlexNet architecture. The data are taken from the 2019 International Skin Imaging Collaboration (ISIC) archives. The optimizer algorithms used are Adaptive Moment Estimation (Adam) and Mini-Batch Gradient Descent (MBGD). The result of the research indicates that ResNet-152 architecture using MBGD optimizer gives the best result with an accuracy of 87.85%