As a vital function of an energy management system for distributed energy resources, optimal operation in distribution systems, and mitigating potentially adverse effects of photovoltaic (PV) systems, accurate forecasting of PV power generation is required. This article presents an alternative technique to improve the accuracy of deep-learning-based short-term PV power-generation forecasting models by clustering the input data using a self-organization map (SOM). To validate the proposed model, long short-term memory (LSTM), feedforward neural network (FNN), FNN with the proposed SOM clustering method (FNN-SOM), and LSTM with the proposed SOM clustering method (LSTM-SOM) were tested and compared with one-year hourly datasets (8760 samples). Root mean square error, mean absolute error, and mean absolute percentage error were used as validation factors in this work. The results show that the proposed method provides a more accurate solar power generation forecast than other methods. Moreover, the proposed method can work effectively even with a few inputs system.