This paper proposes an optimized convolutional neural network-based tapered nine-core optical fiber (CNN-TNOF) structure for the measurement of temperature and refractive index (RI). The OCNN-based monitoring apparatus offers a smaller 3 dB bandwidth of similar to 0.05 nm and a superior optical signal-to-noise ratio of similar to 40 dB than a typical wideband detecting device. The output wavelength has a redshift when the CNN-TNOF component is exposed to rising RI responses. Significantly, the detection technology presented by the authors has a narrow 3 dB spectrum, is simple to build, has a high signal-to-noise ratio, has good resolution, and yet is simpler to observe. The performance of CNN-TNOF was compared with other better methods with the help of performance measures, namely accuracy, precision, and F-1-score. In terms of performance metrics, the suggested technique performed better than the other methods, it has a greater accuracy of 1.62% than SVM, 1.88% more than DBN, 3.28% more accuracy than CSO-DBN, and 4.47% more than KNN achieved for RI measurement. Similarly, the proposed CNN-TNOF achieved at 1.86%, 2.24%, 4.12%, and 5.23% higher than SVM, DBN, GSO-DBN, and KNN, respectively in temperature measurement. As a result, the proposed method is suitable for temperature and RI measurements.