Solar power integration has shown a significant growth in many power systems during the last decade. The intermittent nature of solar irradiance tends to vary the amount of solar power in the system and an accurate solar power forecasting method can be used to tackle this in power system planning and operation. In this paper, authors have proposed a generalized ensemble model integrating deep learning techniques to generate accurate solar power forecasts for 21 solar photovoltaic facilities located in Germany. Most important weather parameters for solar power generation are selected through a feature selection process. In addition, a weather classification approach is used to cluster the dataset and for each cluster, a separate ensemble algorithm is assigned. Finally, considering the prediction errors in each cluster, a novel ensemble model is developed. The proposed models are evaluated using root mean square error and results are compared with single machine learning techniques and available forecasting models in the literature. Compared to deep belief network, support vector regression and random forest regression models, the proposed ensemble model with cloud classification reduces RMSE error by 10.49%, 7.78%, and 7.95% respectively. Results show that the weather classification approach reduces the forecasting error by a considerable margin and the proposed ensemble model provides a better forecasting accuracy than single machine learning methods.