This study was conducted in order to determine energy consumption, model and analyze the input–output, energy efficiencies and GHG emissions for watermelon production using artificial neural networks (ANNs) in the Guilan province of Iran, based on three different farm sizes. For this purpose, the initial data was collected from 120 watermelon producers in Langroud and Chaf region, two small cities in the Guilan province. The results indicated that total average energy input for watermelon production was 40228.98MJha–1. Also, chemical fertilizers (with 76.49%) were the highest energy inputs for watermelon production. Moreover, the share of non-renewable energy (with 96.24%) was more than renewable energy (with 3.76%) in watermelon production. The rate of energy use efficiency, energy productivity and net energy was calculated as 1.29, 0.68kgMJ−1 and 11733.64MJha−1, respectively. With respect to GHG analysis, the average of total GHG emissions was calculated about 1015kgCO2eq.ha−1. The results illustrated that share of nitrogen (with 54.23%) was the highest in GHG emissions for watermelon production, followed by diesel fuel (with 16.73%) and electricity (with 15.45%). In this study, Levenberg–Marquardt learning Algorithm was used for training ANNs based on data collected from watermelon producers. The ANN model with 11–10–2 structure was the best one for predicting the watermelon yield and GHG emissions. In the best topology, the coefficient of determination (R2) was calculated as 0.969 and 0.995 for yield and GHG emissions of watermelon production, respectively. Furthermore, the results of sensitivity analysis revealed that the seed and human labor had the highest sensitivity in modeling of watermelon yield and GHG emissions, respectively.