Carbonate rocks are very heterogeneous and have very complex pores structure due to the presence of intra-particle and inter-particle porosities. This makes the characterization and evaluation of the petrophysical data, and the interpretation of the carbonate rocks a big challenge. Porosity in complex lithologies, particularly carbonate reservoirs, is difficult to measure using conventional (Quad-Combo) well logs. Nuclear Magnetic Resonance (NMR) derived porosity is considered the total porosity "gold standard", as it is measured exclusive of matrix and mineralogy. However, due to NMR tools existing as relatively new technology, and the extra expense in logging runs and rig time, most wells lack these data. Most of the existing approaches to predict the rock porosity was developed on the Neutron-density porosity logs that usually are resulted in inaccurate estimation, especially in the fractured zone and highly dolomitized rocks. In this study, deep learning model was efficiently utilized to predict the Nuclear Magnetic Resonance based effective porosity in carbonate rocks. The petrophysical well logs such as bulk density, gamma-ray, neutron porosity, photoelectric log, and caliper log were used as predictors. A total of 3800 data points were obtained from several wells located in a carbonate reservoir. A comprehensive data exploratory analysis tools (EDA) was utilized to evaluate the quality of the dataset which led to removing the extreme values and outliers. A fully connected Deep Neural Network (DNN) was trained to predict NMR based effective porosity. The hyperparameters of DNN model such as number of hidden layers, number of neurons, activation functions, and learning algorithms were varied using a grid search optimization approach. The K-fold cross-validation criteria were used to enhance the generalization capabilities of ML models. The evaluation of ML models was assessed by the coefficient of determination (R2), root means square error (RMSE), and. average absolute percentage error (AAPE). The results showed that the DNN resulted in a significantly low error and high R2 between actual and predicted values. An accuracy of 87% was recorded between actual and predicted NMR values. The new model to predict the NMR porosity is trained on the NMR-determined porosity. NMR porosity is based on the number of hydrogen nuclei in the pore spaces that are independent of the rock minerals and related to the pore spaces only.