Lung and colon cancers are two of the most lethal and common types of cancer in the United States that are accounting for 28.7% cancer related-deaths and 18.7% new cases in 2025 [1]. Early diagnosis is crucial for initiating therapeutic treatments, limiting the progression of the disease and improving the quality of life for the patients. Several machine and deep learning techniques (e.g., SVM, ANN and CNN) have been proposed for the detection, classification and staging of lung and colon cancers. However, the proposed techniques required a large number of learning parameters (e.g., ResNet-50 deploys approximately 23.5 million parameters) and hence high computational complexity platforms and large memory overheads were needed. In order to overcome this burden, we proposed a novel lightweight deep learning framework that deployed depthwise and pointwise convolutional attention (DPCA) blocks, which tightly integrated lightweight convolutions (i.e., depthwise, and pointwise convolutions (e.g., as used in MobileNet)) with channel and spatial attention mechanisms in order to enhance discriminative feature learning while maintaining a low computational cost. The proposed framework offered a significantly high accuracy (i.e., > 99%) using as low as 0.0036 million parameters and 0.048G Floating Point Operations (FLOPS) as compared to the-state-of-the-art methods across three classification tasks including lung cancer, colon cancer and lung and colon cancer classification applications.