This paper presents a novel method to improve drill pressure measurement accuracy in slim-hole drilling within the petroleum industry, a sector often plagued by extreme conditions that compromise data integrity. We introduce a temperature compensation model based on a Chaotic-Initiated Adaptive Whale Optimization Algorithm (C-I-WOA) for optimizing Convolutional Neural Networks (CNNs), dubbed the C-I-WOA-CNN model. This approach enhances the Whale Optimization Algorithm (WOA) initialization through chaotic mapping, boosts the population diversity, and features an adaptive weight recalibration mechanism for an improved global search and local optimization. Our results reveal that the C-I-WOA-CNN model significantly outperforms traditional CNNs in its convergence speed, global searching, and local exploitation capabilities, reducing the average absolute percentage error in pressure parameter predictions from 1.9089% to 0.86504%, thereby providing a dependable solution for correcting temperature-induced measurement errors in downhole settings.