Unconventional resources have made a significant contribution to fossil energy supply to date, and some specific stimulation techniques have been used in their exploitation. For example, the use of scCO2 foam as a hydraulic fracturing stimulation fluid has sparked considerable interest due to its numerous advantages in terms of fracturing and production performance. The strength of scCO2 foam, an indicator of foam performance, highly depends on the formulation design, foaming properties and operating conditions. Due to complex nature of foam, the quantification of foam strength at downhole conditions is challenging. Specific screening and optimization processes are required to design high performance foam. Although the flow behavior (apparent viscosity) of foam has been extensively studied with empirical models, integrating some essential process parameters into the foam flow behavior evaluation remains challenging. In this study, we present an effective model that incorporates the benefits of a deep learning (DL) approach while taking into account the integration of specific process variables. Several input parameters such as surfactant types and concentration, salinity, polymer concentration, temperature and pressure were used in conjunction with foam quality and shear rate. To predict foam strength while taking the aforementioned parameters into account, a deep neural network (DNN) with optimized hyperparameters was developed. The experimental data for this purpose were obtained using a pressurized foam rheometer. An improved deep learning framework was developed and designed to learn the intrinsic relation among various parameters. The predictive study concludes that, the developed optimized DNN algorithm can provide a reliable and robust prediction with significantly high accuracy. When compared to a shallow network with a standard deviation of less than 5%, the developed optimal deep neural network increased average predictive accuracy to 95.64%. The regression coefficient in the optimized case was found to be nearly one with a low mean square error. The developed DNN algorithm is considered as an improved framework which encompasses several process variables and provides reliable and accurate prediction thus makes it suitable for further integration with fracturing simulator. It would also be helpful for optimizing fracturing process and improving foam formulations.