Fog computing has gained great attention due to the rapid development of smart devices, which often require real-time and stringent delay services. Moreover, the delay requirement of IoT tasks and the energy consumption of devices in fog have become an active research area. Fog computing contains highly distributed, dynamic, and resource-constrained devices. Thus, deploying fog computing resources is necessary for executing heterogeneous and delay-sensitive tasks in fog computing effectively. Also, task scheduling has become a more complex task because it facilitates managing the resources and minimizes the energy consumption of fog nodes in fog computing. Hence, Deep learning models effectively predict resource demands and optimize resource allocation to tackle the challenges above. Also, Deep Neural networks jointly consider both energy and delay aware constraints while task scheduling in fog computing and minimize the energy consumption.