The mortality rate of breast cancer can be reduced by early diagnosis and treatment. The computer-aided diagnosis (CAD) systems can effectively help physicians identify the early stage of breast cancer. The primary tool for such systems is mammograms. Usually, these images lack high quality. Furthermore, due to the irregular shape of masses, their size variability, and the apparent similarity of the masses and other dense regions of the breast tissue, it is difficult to detect and diagnose the masses. Although many image processing techniques have been presented for diagnosis of breast masses, they have not been quite successful, and this problem has been retained as a challenge yet. In this paper, a method for classifying breast tissues into normal and abnormal (i.e., cancerous) is proposed, which is based on a deep learning approach. It mainly contains a new convolutional neural network (CNN) and a decision mechanism. After a preprocessing phase, a block around each pixel is fed into a trained CNN to determine whether the pixel belongs to normal or abnormal tissues. This results in a binary map for the input suspicious tissue. Afterward, as a decision mechanism, a thresholding technique is applied to a central block on the produced binary map to label it. The new architecture of the CNN, the training scheme of the network, employing the CNN for classifying the pixels of the suspicious regions rather than the entire input, exerting an effective decision mechanism on the output of the CNN and the learning of the model parameters, helped us achieve superior results compared to state-of-the-art methods by reaching 95 and 94.68 percent for AUC and accuracy, respectively.