This article presents Artificial Neural Networks (ANN) for convective heat transfer in a trapezoidal cavity subjected to a corrugated heated rod inside it. The Levenberg–Marquardt algorithm is utilized to optimize the Neural Networks. The trapezoidal cavity has low-temperature inclined walls and adiabatic upper and lower walls compared to the corrugated heated rod. Single-wall carbon (SWCNTs) nanomaterials are submerged in the base liquid water. The flow of SWCNTs-water is generated due to the temperature gradient in the cavity. The system of dimensional partial differential equations has been formulated for the physical setup under investigation. The dimensional system has been converted into a non-dimensional form using dimensionless variables. Finite element is used for the solutions. The dimensionless functions velocity, temperature, and heat transfer rates are studied against the Rayleigh number (Ra). The outcomes are presented in the form of isotherms, contours, tabular values, and graphs. The data for Artificial Neural Networks (ANN) has been generated by FEM against the Nusselt number. The ANN has been trained for a specific amplitude of the rod and predicted heat transfer against a larger amplitude. The results show good agreement for both training and testing data. The outcomes of analysis reveals that convection caused by temperature gradient is dominant for higher values of the Rayleigh number (Ra). Local Nusselt number has been discussed against different amplitudes, and predicted enhancement for the larger amplitude of the rod.