Deep Learning-Based Forecasting And Energy Management Algorithms For Smart Grid Applications