Liver cancer occur when normal cells develop aberrant DNA alterations and reproduce uncontrollably. Patients with cirrhosis, hepatitis B or C, or both have an increased risk of developing the progressing stage of cancer. The radiologists spend more time for detecting the liver cancer when analysing with traditional methods. Early detection of liver cancer can help doctors and radiation therapists identify the tumours. However, manual identification of liver cancer is time-intensive and challenging process in the current scenario. In this work, an automated deep learning network is designed to classify the liver cancer in its initial phase. At first, the CT scans are gathered from the publicly available LiTS database and these gathered images are pre-processed using Gaussian filter is used for reducing the noises and to smoothen the edges. The liver region is segmented using Enhanced otsu (EM) method is utilized to segment the liver region separately from the pre-processed input images. Afterwards, Dilated Convolutional Neural Network (DCNN) with the attention block is employed for classifying the liver cancer into tri-classes such as normal controls (NC), hepatocellular carcinoma (HCC) and cholangiocarcinoma (CC) cases based on the extracted features. The efficiency of the proposed DA-CNN is evaluated using the attributes viz., accuracy, sensitivity, precision, specificity, and F1-score values are computed as classification results. The experimental fallouts disclose that the DA-CNN attains an accuracy range of 98.20%. Moreover, the proposed DA-CNN advances the overall accuracy by 3.25%, 5.29%, and 0.99% better than Optimised GAN, OPBS-SSHC, HFCNN respectively.